Fetch() POST and the body

I can set the header for a POST request with fetch() - but how can I set the body of the request to pass some data for the POST request? If I add the data with “?mydata=…” to the URL of the fetch request I change the request to GET since passing the data as part of the URL is not allowed for a POST request. Is there a way to add a body using the fetch() command?

Ah – I’m doing it wrong.

What I presume we want to do is to take the $Text of this note, optionally pass it through an export template, and post that to the server. Is that what you’d expect?

1 Like

using $Text would be a way to go. Currently I simply miss any option to add a body with data to the POST command :wink:

It is indeed an oversight. I’ll try to get it into the next backstage release.

1 Like