Fetch.Body
Body specification and interface.
val of_uri_params : Brr.Uri.Params.t -> init
of_uri_params p
is a body from URI params p
.
val of_form_data : Form.Data.t -> init
of_form_data d
is a body from form data d
.
val of_blob : Brr.Blob.t -> init
of_blob b
is a body from blob b
.
val of_array_buffer : Brr.Tarray.Buffer.t -> init
of_array_buffer b
is a body from array buffer b
.
The type for objects implementing the Body
interface.
val array_buffer : t -> Brr.Tarray.Buffer.t Fut.or_error
array_buffer b
reads b
into an array buffer.
val blob : t -> Brr.Blob.t Fut.or_error
blob b
reads b
as a blob.
val form_data : t -> Form.Data.t Fut.or_error
form_data b
reads b
as form data.
val json : t -> Brr.Json.t Fut.or_error
json b
reads b
and parses it as JSON data.
val text : t -> Jstr.t Fut.or_error
text b
reads b
and UTF-8 decodes it to a string.