POST and Sending Data
Send JSON payloads with request options.
Sending Data to a Server
To create or update data you send a request with a body. Fetch supports this through the options object passed as the second argument.
Setting the Method
Set method to the HTTP verb you need: POST to create, PUT/PATCH to update, DELETE to remove.
fetch(url, { method: "POST" });