xmpp-httpx - v0.11.0
    Preparing search index...

    Class HttpxResponse

    The response surface returned by HttpxClient.request(). Mirrors the parts of WHATWG Response that matter, plus xml() (XMPP-native bodies) and a zero-copy bridge to a real Response for browser consumption.

    Index
    • Parameters

      • init: {
            body: ReadableStream<Uint8Array<ArrayBufferLike>> | null;
            extensions?: Element[];
            headers: Headers;
            statusCode: number;
            statusMessage?: string;
            version: string;
        }

      Returns HttpxResponse

    body: ReadableStream<Uint8Array<ArrayBufferLike>> | null
    extensions: Element[]

    Children of the in other namespaces, verbatim; empty when none.

    headers: Headers
    statusCode: number
    statusMessage: string
    version: string
    • Returns Promise<Uint8Array<ArrayBufferLike>>

    • Parses the body as form data. Delegates to the platform's own parser, which handles both application/x-www-form-urlencoded and multipart/form-data — reimplementing multipart here would be a liability, not a feature.

      Returns Promise<FormData>

    • Bridges to a real WHATWG Response — new Response(stream) — so browser code (and the future httpx browser) can consume it natively.

      Returns Response

    • Parses the body as a single XML element; null for an empty body.

      Returns Promise<Element | null>