Skip to main content

Function: decodeResponse()

decodeResponse(data, decodeHeaders?, decodeBody?): Response

Defined in: web-api-encoding.ts:260

Decode from an intermediate form to a Response object

Why callbacks? Users can safely ignore the optional decodeHeaders and decodeBody callbacks. They are used internally to enable cycle/alias tracking when this object is embedded in another object.

Parameters

data

any

The encoded Response data

decodeHeaders?

(h) => Headers

Optional callback to decode Headers (default: inline decoding)

decodeBody?

(b) => ArrayBuffer

Optional callback to decode body (default: inline decoding)

Returns

Response