@libp2p/http
    Preparing search index...

    Extends the native Response class to be more flexible.

    • response headers - the fetch spec restricts access to certain headers that we need access to set-cookie, Access-Control-*, etc, and the native Response implementations remove them

    • status codes - we need to represent all possible HTTP status codes, not just those allowed by the fetch spec

    Hierarchy

    Index

    Constructors

    Properties

    body: null | ReadableStream<Uint8Array<ArrayBufferLike>>
    bodyUsed: boolean
    headers: Headers
    ok: boolean
    redirected: boolean
    status: number
    statusText: string
    type: ResponseType
    url: string

    Methods

    • Returns Response

    • Returns Response

    • Returns Promise<any>

    • Returns Promise<any>

    • Returns Promise<string>

    • Returns Promise<string>

    • Parameters

      • data: any
      • Optionalinit: ResponseInit

      Returns Response

    • Parameters

      • url: string | URL
      • Optionalstatus: number

      Returns Response