Request

package js.html

Available on js

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:Request, ?init:Null<RequestInit>)

new(input:String, ?init:Null<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", "include"). The default is "same-origin".

read onlydestination:RequestDestination

Returns a string from the RequestDestination enum describing the request's destination. This is a string indicating the type of content being requested.

read onlyheaders:Headers

Contains the associated Headers object of the request.

read onlyintegrity:String

Contains the subresource integrity value of the request (e.g., sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=).

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 onlysignal:AbortSignal

read onlyurl:String

Contains the URL of the request.

Methods

arrayBuffer():Promise<ArrayBuffer>

Throws:

null

DOMError

blob():Promise<Blob>

Throws:

null

DOMError

clone():Request

Creates a copy of the current Request object.

Throws:

null

DOMError

formData():Promise<FormData>

Throws:

null

DOMError

json():Promise<Dynamic>

Throws:

null

DOMError

text():Promise<String>

Throws:

null

DOMError

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Request.html