RAGS - v1.10.0
    Preparing search index...

    Class Response

    Represents an HTTP response, providing methods to read the body as text, JSON, ArrayBuffer, or raw GBytes.

    Index

    Constructors

    • Parameters

      • status: number
      • statusText: string | null
      • ok: boolean
      • stream: InputStream | null

      Returns Response

    Methods

    • Reads the response body as an ArrayBuffer.

      Returns Promise<ArrayBufferLike | null>

    • Reads the response body as GLib.Bytes.

      Returns Promise<Bytes | null>

    • Reads the response body and parses it as JSON.

      Returns Promise<any>

    • Reads the response body as a UTF-8 string.

      Returns Promise<string>

    Properties

    ok: boolean

    Whether the status code is in the 2xx range.

    status: number

    HTTP status code.

    statusText: string | null

    HTTP status text (reason phrase).

    stream: InputStream | null

    The raw response input stream.

    type: string = 'basic'

    Response type (always 'basic').