Post url is not working

Requires header: "Content-Type": "application/json"

Example function for entry update:

async function sendRequest(url, {arg}) {
  return fetch(url, {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({data: {...arg}}),
  });
}

Payload:
{ "data": { "name": "Test name" } }

2 Likes