When sending data to a server, you need to specify the HTTP method as POST (or PUT/PATCH),
set the Content-Type header to indicate the format, and serialize the data
in the request body.
For JSON APIs, you must set Content-Type: application/json and use
JSON.stringify() to convert your JavaScript object to a JSON string.