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