Response

Use the response object to set outgoing response data. The response object API is defined below.

res.append

type: Function

From: https://expressjs.com/en/api.html#res.append

Appends the specified value to the HTTP response header field. If the header is not already set, it creates the header with the specified value. The value parameter can be a string or an array

res.headers

type: Object

Object for storing key-value pairs of response headers

res.json

type: Function

Stores the given Object or Array as JSON payload in the response body.

res.send

type: Function

Sends the given String back in the HTTP response body

res.set(field, [, value])

type: Function

Sets the response's HTTP header field to value

res.status(statusCode)

type: Function

Sets the response's status code to statusCode