Type Alias: ResponseBodyType
ResponseBodyType =
"auto"|"json"|"text"|"binary"|"blob"|"stream"|"ndjson"
Defined in: api/rust-fetch.d.ts:53
How to decode the response body:
auto(default): JSON forapplication/jsonand*+json, text fortext/*and XML, otherwiseUint8Arrayjson: alwaysJSON.parse(fails with aParseErrorif the body isn't JSON)text: always a stringbinary: always aUint8Arraystream: aReadableStream<Uint8Array>, returned as soon as the headers arrivendjson: aReadableStreamof parsed JSON values, one per line of newline-delimited JSON, returned as soon as the headers arrive
Empty bodies are null for auto/json, "" for text and an empty Uint8Array for binary. blob is a Blob typed with the response's Content-Type (an empty one for an empty body).