Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Response

Hierarchy

  • Body
    • Response

Index

Constructors

  • new Response(body?: null | Body | BodyTypes, init?: Partial<ResponseInit>, extra?: Partial<Extra>): Response
  • Parameters

    • Optional body: null | Body | BodyTypes
    • Optional init: Partial<ResponseInit>
    • Optional extra: Partial<Extra>

    Returns Response

Properties

_body?: null | StorageBodyTypes
_length: null | number
_mime?: string
bodyUsed: boolean
headers: Headers
httpVersion: HttpVersion
ok: boolean
redirected: boolean
status: number
statusText: string
type: ResponseTypes
url: string
useFinalURL: boolean

Methods

  • arrayBuffer(allowIncomplete?: boolean): Promise<ArrayBuffer>
  • Parameters

    • Optional allowIncomplete: boolean

    Returns Promise<ArrayBuffer>

  • Returns Response

  • formData(): Promise<never>
  • Returns Promise<never>

  • hasBody(): boolean
  • Returns boolean

  • json(): Promise<any>
  • Returns Promise<any>

  • readable(): Promise<ReadableStream>
  • Returns Promise<ReadableStream>

  • setBody(body: null | BodyTypes | IBody, mime?: null | string, integrity?: null | string, length?: null | number): void
  • Parameters

    • body: null | BodyTypes | IBody
    • Optional mime: null | string
    • Optional integrity: null | string
    • Optional length: null | number

    Returns void

  • setSignal(signal: undefined | AbortSignal): void
  • Parameters

    • signal: undefined | AbortSignal

    Returns void

  • text(allowIncomplete?: boolean): Promise<string>
  • Parameters

    • Optional allowIncomplete: boolean

    Returns Promise<string>

  • Returns Response

  • redirect(url: string, status?: number): Response
  • Parameters

    • url: string
    • Optional status: number

    Returns Response

Generated using TypeDoc