MLE Fetch API polyfill(mle-js-fetch)
    Preparing search index...

    Class Response

    The result of a resource retrieval.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    headers: Headers = ...
    statusText: string = ''
    url: string = null

    Accessors

    • get body(): ReadableStream<Uint8Array>

      Retrieve the contents of the body.

      Returns ReadableStream<Uint8Array>

    • get bodyUsed(): boolean

      Check if the contents of the body have been consumed.

      Returns boolean

    • get ok(): boolean

      Check if this response is a result of a successful request.

      Returns boolean

    • get status(): number

      Get the HTTP status code, e.g. 200

      Returns number

    Methods

    • Consume the body as ArrayBuffer.

      Returns Promise<ArrayBufferLike>

    • Consume the contents of the body as a Blob.

      Returns Promise<Blob>

    • Consume the contents of the body as Uint8Array.

      Returns Promise<Uint8Array>

    • Consume the contents of the body as JSON.

      Returns Promise<any>

    • Consume the contents of the body as text.

      Returns Promise<string>

    • Create a new response that represents a network error.

      Returns Response

    • Create a new response, whose body is JSON-encoded data

      Parameters

      • data: any

        JSON-encoded body of the response

      • Optionalinit: ResponseInit

        additional response metadata

      Returns Response