how can one send data within a request body using "fetch"?

This issue has been tracked since 2022-07-27.

The title already describes the problem:

how can "fetch" send some data as part of a request's body to a server?

I tried

    on fetch:beforeRequest (headers, body)
      set headers['Content-Type'] to 'application/x-www-form-urlencoded'
      set body to '[email protected]'

but - according to the networking log in browser's developer tools - that did not actually provide a body

dz4k wrote this answer on 2022-08-18

The fetch command supports all options of the fetch API:

fetch /path with body: '[email protected]', headers: { content-type: 'application/x-www-form-urlencoded' }
rozek wrote this answer on 2022-08-18

Great! Thank you very much!

More Details About Repo
Owner Name bigskysoftware
Repo Name _hyperscript
Full Name bigskysoftware/_hyperscript
Language JavaScript
Created Date 2020-05-27
Updated Date 2022-11-25
Star Count 1265
Watcher Count 18
Fork Count 75
Issue Count 86


Issue Title Created Date Updated Date