Packages@robojs/server
RoboResponse
Class: RoboResponse
Extends the Web Response API with additional convenience methods.
Extends
Response
Constructors
new RoboResponse()
new RoboResponse(body?, init?): RoboResponseParameters
| Parameter | Type |
|---|---|
body? | BodyInit |
init? | ResponseInit |
Returns
Overrides
Response.constructorMethods
json()
static json<JsonBody>(body, init?): RoboResponseThe 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.
Type Parameters
| Type Parameter |
|---|
JsonBody |
Parameters
| Parameter | Type |
|---|---|
body | JsonBody |
init? | ResponseInit |
Returns
Overrides
Response.json