# Sending Data with fetch

To send data to an API, give fetch a second argument with method POST, a Content-Type header that says the body is JSON, and a body made with JSON.stringify; and know that CORS, the API's rule about which sites may call it, decides whether a page can call it at all.

![Cheat sheet: Sending Data with fetch](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/e757ca34e9a7480197a82ba67ff8545d.webp)

- Category: JavaScript
- Level: Journeyman
- Tags: &lt;header>, Content-Type, CORS, JavaScript, JSON.stringify(), POST, Request Body (rest-api), rest-api, web-development
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/javascript-fetch-sending-data-cheat-sheet
