Response
Types
bodyInit
type bodyInit = BodyInit.theadersInit
type headersInit = HeadersInit.tresponseInit
type responseInit = FetchTypes.responseInitRecord fields
status
option< int >
statusText
option< string >
headers
option< headersInit >
t
type t = FetchTypes.response = { type_: FetchTypes.responseType, url: string, redirected: bool, status: int, ok: bool, statusText: string, headers: FetchTypes.headers, body: Null.t<FileTypes.readableStream<array<int>>>, bodyUsed: bool,}Record fields
Values
arrayBuffer
let arrayBuffer: t => promise<ArrayBuffer.t>bytes
let bytes: t => promise<array<int>>formData
let formData: t => promise<FormData.t>fromArrayBuffer
let fromArrayBuffer: (ArrayBuffer.t, ~init: responseInit=?) => tfromBlob
let fromBlob: (Blob.t, ~init: responseInit=?) => tfromDataView
let fromDataView: (DataView.t, ~init: responseInit=?) => tfromFile
let fromFile: (File.t, ~init: responseInit=?) => tfromFormData
let fromFormData: (FormData.t, ~init: responseInit=?) => tfromNull
let fromNull: (~init: responseInit=?) => tfromReadableStream
let fromReadableStream: (ReadableStream.t<'t>, ~init: responseInit=?) => tfromString
let fromString: (string, ~init: responseInit=?) => tfromTypedArray
let fromTypedArray: (TypedArray.t<'t>, ~init: responseInit=?) => tfromURLSearchParams
let fromURLSearchParams: (URLSearchParams.t, ~init: responseInit=?) => tjson
let json: t => promise<JSON.t>jsonR
let jsonR: (~data: JSON.t, ~init: responseInit=?) => tredirect
let redirect: (~url: string, ~status: int=?) => t