body property

RequestBody get body

Any body that you want to add to your request: this can be a JSString, an JSArrayBuffer, a Blob, a JSDataView, a File, a FormData, an JSTypedArray, a URLSearchParams or a ReadableStream.

This latest possibility is still experimental; check the compatibility information to verify you can use it.

Note that a request using the GET or HEAD method cannot have a body.

Implementation

RequestBody get body => RequestBody.fromJSAny(_body);
set body (RequestBody body)

Implementation

set body(RequestBody body) => _body = body.toJS;