We use cookies to enhance your browsing experience.
Send JSON data via POST.
fetch('https://api.example.com/users', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ name: 'John Doe' }), }) .then(response => response.json()) .then(data => console.log(data));
We use cookies to enhance your experience and serve personalized ads.