Skip to main content

Class: RoboResponse

Extends the Web Response API with additional convenience methods.

Extends

  • Response

Constructors

new RoboResponse()

new RoboResponse(body?, init?): RoboResponse

Parameters

ParameterType
body?BodyInit
init?ResponseInit

Returns

RoboResponse

Overrides

Response.constructor

Properties

PropertyModifierTypeDescriptionInherited from
bodyreadonlyReadableStream<Uint8Array>MDN ReferenceResponse.body
bodyUsedreadonlybooleanMDN ReferenceResponse.bodyUsed
headersreadonlyHeadersMDN ReferenceResponse.headers
okreadonlybooleanMDN ReferenceResponse.ok
redirectedreadonlybooleanMDN ReferenceResponse.redirected
statusreadonlynumberMDN ReferenceResponse.status
statusTextreadonlystringMDN ReferenceResponse.statusText
typereadonlyResponseTypeMDN ReferenceResponse.type
urlreadonlystringMDN ReferenceResponse.url

Methods

arrayBuffer()

arrayBuffer(): Promise<ArrayBuffer>

MDN Reference

Returns

Promise<ArrayBuffer>

Inherited from

Response.arrayBuffer


blob()

blob(): Promise<Blob>

MDN Reference

Returns

Promise<Blob>

Inherited from

Response.blob


clone()

clone(): Response

MDN Reference

Returns

Response

Inherited from

Response.clone


formData()

formData(): Promise<FormData>

MDN Reference

Returns

Promise<FormData>

Inherited from

Response.formData


json()

json(): Promise<any>

MDN Reference

Returns

Promise<any>

Inherited from

Response.json


text()

text(): Promise<string>

MDN Reference

Returns

Promise<string>

Inherited from

Response.text


error()

static error(): Response

MDN Reference

Returns

Response

Inherited from

Response.error


json()

static json<JsonBody>(body, init?): RoboResponse

MDN Reference

Type Parameters

Type Parameter
JsonBody

Parameters

ParameterType
bodyJsonBody
init?ResponseInit

Returns

RoboResponse

Overrides

Response.json


redirect()

static redirect(url, status?): Response

MDN Reference

Parameters

ParameterType
urlstring | URL
status?number

Returns

Response

Inherited from

Response.redirect

Robo.js Logo

MIT © 2024 Robo.js By WavePlay