Body of the response.
Headers for the response, as an array of [key, value] tuple arrays.
Stores the raw, unencoded body in case the user calls encodeAs()
Change the encoding of the body in the response. By default, Response will encode the body contents as JSON, even if the type of the value is a string. To send a body which is not JSON, you must call encodeAs('raw').
Attach the given header to this response and return itself for fluent calls.
Throw this response as an HttpError
Return a 202 Accepted response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 502 Bad Gateway response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 400 Bad Request response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 409 Conflict response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 100 Continue response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 201 Created response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 417 Unsupported Media Type response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 403 Forbidden response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 302 Found response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 504 Gateway Timeout response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 410 Gone response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 505 HTTP Version Not Supported response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 411 Length Required response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 405 Method Not Allowed response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 301 Moved Permanently response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 300 Multiple Choices response with the given body (will be encoded as JSON, append encodeAs('raw') to disable). There is no standard format for the body, but you should indicate Content-Type, and ideally provide a Location header indicating the server's preferred choice.
Return a 204 No Content response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 203 Non-Authoritative Information response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 406 Not Acceptable response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 404 Not Found response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 501 Not Implemented response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 304 Not Modified response. This request should usually have a Date header on it as well.
Return a 200 OK response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 206 Partial Content response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 402 Payment Required response with the given body (will be encoded as JSON, append encodeAs('raw') to disable). Caution: This status code has not been formally specified.
Return a 412 Precondition Failed response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 102 Processing response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 407 Not Acceptable response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 416 Unsupported Media Type response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 408 Request Timeout response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 413 Request Entity Too Large response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 205 Reset Content response.
Return a 303 See Other response with the given body (will be encoded as JSON, append encodeAs('raw') to disable). Use this after a new resource is created from a PUT or POST request to send the user agent to the new resource without causing them to redirect future requests to the POST/PUT endpoint itself.
Return a 500 Internal Server Error response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 503 Service Unavailable response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 101 Switching Protocols response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 307 Temporary Redirect response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 401 Unauthorized response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 415 Unsupported Media Type response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 414 Request-URI Too Long response with the given body (will be encoded as JSON, append encodeAs('raw') to disable).
Return a 305 Use Proxy response with the given body (will be encoded as JSON, append encodeAs('raw') to disable). Use this if you are restricting requests only to approved proxies, and the user is not an approved proxy.
Generated using TypeDoc
Constructs a new Response, with the given status code, headers, and body. The body will be encoded as JSON by default. Use
encodeAs('raw')
to disable JSON encoding.