The Request interface of the Fetch API represents a resource request.

Documentation Request by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(input:EitherType<Request, String>, ?init:RequestInit)

Throws:

null

DOMError

Variables

read onlybodyUsed:Bool

read onlycache:RequestCache

Contains the cache mode of the request (e.g., default, reload, no-cache).

read onlycredentials:RequestCredentials

Contains the credentials of the request (e.g., omit, same-origin).

read onlyheaders:Headers

Contains the associated Headers object of the request.

read onlymethod:String

Contains the request's method (GET, POST, etc.)

read onlymode:RequestMode

Contains the mode of the request (e.g., cors, no-cors, same-origin, navigate.)

read onlyredirect:RequestRedirect

Contains the mode for how redirects are handled. It may be one of follow, error, or manual.

read onlyreferrer:String

Contains the referrer of the request (e.g., client).

read onlyreferrerPolicy:ReferrerPolicy

Contains the referrer policy of the request (e.g., no-referrer).

read onlyurl:String

Contains the URL of the request.

Methods

arrayBuffer():Promise<ArrayBuffer>

Throws:

null

DOMError

blob():Promise<Blob>

Throws:

null

DOMError

clone():Request

Throws:

null

DOMError

formData():Promise<FormData>

Throws:

null

DOMError

json():Promise<Dynamic>

Throws:

null

DOMError

text():Promise<String>

Throws:

null

DOMError