W3cubDocs

/Haxe JavaScript

Request

package js.html

@:native("Request") 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:

Constructor

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

Throws:

null DOMError

Variables

read only bodyUsed:Bool

read only cache:RequestCache

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

read only credentials:RequestCredentials

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

read only headers:Headers

Contains the associated Headers object of the request.

read only method:String

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

read only mode:RequestMode

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

read only redirect:RequestRedirect

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

read only referrer:String

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

read only referrerPolicy:ReferrerPolicy

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

read only url: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

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