Skip to content

Response status code

HTTP status code

statusCode use to set/get status code of the response.

g.res.statusCode = T.EStatusCode.BAD_REQUEST;

Response

{
    "success": false,
    "statusCode": 400,
    "data": 400
}

All supported status code.

OK = 200,
NO_CONTENT = 204,
CREATED = 201,
BAD_REQUEST = 400,
UNAUTHORIZED = 401,
FORBIDDEN = 403,
RESOURCE_NOT_FOUND = 404,
INTERNAL_SERVER_ERROR = 500