Configures the way a resource is retrieved.

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

credentials: string = 'same-origin'
headers: Headers = ...
method: string = 'GET'
url: string = null

Accessors

  • get body(): BodyType
  • Retrieve the contents of the body.

    Returns BodyType

  • get bodyUsed(): boolean
  • Check if the contents of the body have been consumed.

    Returns boolean

Methods

  • Returns Promise<ArrayBuffer>

  • Consume the contents of the body as JSON.

    Returns Promise<any>

  • Consume the contents of the body as text.

    Returns Promise<string>