Request Module
Import
Represents the current HTTP request. The request includes the following properties:
_id
(ObjectId) the request identifierbody
(Object) the request bodyclient
(Object)_id
(ObjectId) the app client identifierkey
(String) the app client key used to perform the request
headers
(Object) an object keyed by the request headers.host
(String) the hostnameparams
(Object) the parsed params from an api endpoint. (eg /routes/:foo -> req.params.foo)path
(String) the url pathquery
(Object) the parse http query portion of the request (eg /foo?bar=baz -> req.query.bar=='baz')url
(String) the original request url
Methods
getCookie(cookie) getHeader(header)
getCookie(cookie)
Get a cookie value.
Arguments
cookie
(String) the cookie name.
Returns
value
(String) the cookie value.
getHeader(header)
Gets a request header
Arguments
header
(String) the name of the header.
Returns
value
(String) the header value.
Last updated