Body

@native @JSType
trait Body extends Object

See body interface in whatwg Fetch spec.

see also Body in MDN

class Object
trait Any
class Object
trait Matchable
class Any
class Request
class Response

Value members

Concrete 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.

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.

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.

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.

def json(): Promise[Any]

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

Takes a Response stream and reads it to completion. It returns a promise that resolves with a JSON 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 methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object