CompatResponse interface

The legacy HTTP response shape retained for the public _response contract.

Extends

Omit<PipelineResponse, "request" | "headers">

Properties

headers

The HTTP response headers.

parsedBody

The response body as parsed JSON or XML.

parsedHeaders

The parsed HTTP response headers.

request

The request that generated this response.

Inherited Properties

blobBody

BROWSER ONLY

The response body as a browser Blob. Always undefined in node.js.

bodyAsText

The response body as text (string format)

browserStreamBody

BROWSER ONLY

The response body as a browser ReadableStream. Always undefined in node.js.

readableStreamBody

NODEJS ONLY

The response body as a node.js Readable stream. Always undefined in the browser.

status

The HTTP status code of the response.

Property Details

headers

The HTTP response headers.

headers: HttpHeadersLike

Property Value

parsedBody

The response body as parsed JSON or XML.

parsedBody?: any

Property Value

any

parsedHeaders

The parsed HTTP response headers.

parsedHeaders?: {[key: string]: unknown}

Property Value

{[key: string]: unknown}

request

The request that generated this response.

request: WebResourceLike

Property Value

Inherited Property Details

blobBody

BROWSER ONLY

The response body as a browser Blob. Always undefined in node.js.

blobBody?: Promise<Blob>

Property Value

Promise<Blob>

Inherited From Omit.blobBody

bodyAsText

The response body as text (string format)

bodyAsText?: string | null

Property Value

string | null

Inherited From Omit.bodyAsText

browserStreamBody

BROWSER ONLY

The response body as a browser ReadableStream. Always undefined in node.js.

browserStreamBody?: WebReadableStream<Uint8Array>

Property Value

WebReadableStream<Uint8Array>

Inherited From Omit.browserStreamBody

readableStreamBody

NODEJS ONLY

The response body as a node.js Readable stream. Always undefined in the browser.

readableStreamBody?: ReadableStream

Property Value

ReadableStream

Inherited From Omit.readableStreamBody

status

The HTTP status code of the response.

status: number

Property Value

number

Inherited From Omit.status