Options
All
  • Public
  • Public/Protected
  • All
Menu

Typed http reponse

Type parameters

  • T

Hierarchy

Index

Properties

Response

Response: { constructor: any; prototype: Response; error: any; redirect: any }

Type declaration

  • constructor: function
    • new __type(body?: BodyInit | null, init?: ResponseInit): Response
    • Parameters

      • Optional body: BodyInit | null
      • Optional init: ResponseInit

      Returns Response

  • prototype: Response
  • error: function
    • Returns Response

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

      • url: string
      • Optional status: undefined | number

      Returns Response

Readonly body

body: ReadableStream<Uint8Array> | null

Readonly bodyUsed

bodyUsed: boolean

Readonly headers

headers: Headers

Readonly ok

ok: boolean

Optional parsedBody

parsedBody: T

Readonly redirected

redirected: boolean

Readonly status

status: number

Readonly statusText

statusText: string

Readonly trailer

trailer: Promise<Headers>

Readonly type

type: ResponseType

Readonly url

url: string

Methods

arrayBuffer

  • arrayBuffer(): Promise<ArrayBuffer>
  • Returns Promise<ArrayBuffer>

blob

  • blob(): Promise<Blob>
  • Returns Promise<Blob>

clone

formData

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

json

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

text

  • text(): Promise<string>
  • Returns Promise<string>

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Protected property
  • Protected method
  • Private property
  • Static method

Generated using TypeDoc