LogoRobo.js
Packages@robojs/server

RoboResponse

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

Methods

json()

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

The json() static method of the Response interface returns a Response that contains the provided JSON data as body, and a Content-Type header which is set to application/json.

MDN Reference

Type Parameters

Type Parameter
JsonBody

Parameters

ParameterType
bodyJsonBody
init?ResponseInit

Returns

RoboResponse

Overrides

Response.json

On this page