Methods

This section describes the methods associated with the Fetch API.

In this section

TopicDescription

clone

Creates a copy of the current Response object.

append

Appends a new value to an already existing header inside a Headers object.

arrayBuffer

Takes a Response or Request stream and returns a promise for an ArrayBuffer object.

blob

Takes a Response or Request stream and returns a promise for a Blob object.

clone

Creates a copy of the current Request object.

delete

Deletes a header from the current Headers object.

fetch

Initiates the fetching of a resource.

get

Gets the first value of a header from the current Headers object.

has

Checks whether or not a header exists within the current Headers object.

json

Takes a Response or Request stream and returns a promise for an object containing JSON data.

set

Sets a new value to an already existing header inside a Headers object.

text

Takes a Response or Request stream and returns a promise for a USVString object.

 

 

 

Show: