Request

@native @JSGlobal @JSType
class Request(input: RequestInfo, init: RequestInit) extends Body

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

see ΒΆ6.3 Request Class in whatwg spec

Value parameters:
init

initialisation information

input

the url of the requested resource or an unused Request object.

trait Body
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

Contains the associated Headers object of the request.

Contains the associated Headers object of the request.

def integrity: String
def keepalive: Boolean
@JSName("type")

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

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

def referrer: String
def url: String

Contains the URL of the request.

Contains the URL of the request.

Inherited methods

def arrayBuffer(): Promise[ArrayBuffer]

Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer.

Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer.

Inherited from:
Body
def blob(): Promise[Blob]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a Blob.

Takes a Response stream and reads it to completion. It returns a promise that resolves with a Blob.

Inherited from:
Body
def bodyUsed: Boolean

Contains a Boolean that indicates whether the body has been read.

Contains a Boolean that indicates whether the body has been read.

Inherited from:
Body
def formData(): Promise[FormData]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a FormData object.

Takes a Response stream and reads it to completion. It returns a promise that resolves with a FormData object.

Inherited from:
Body
def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def json(): Promise[Any]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a JSON object. //todo: define the JSON type, and return a Promise[JSON] as per spec

Takes a Response stream and reads it to completion. It returns a promise that resolves with a JSON object. //todo: define the JSON type, and return a Promise[JSON] as per spec

Inherited from:
Body
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def text(): Promise[String]

Takes a Response stream and reads it to completion. It returns a promise that resolves with a USVString (text).

Takes a Response stream and reads it to completion. It returns a promise that resolves with a USVString (text).

Inherited from:
Body
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object