Request Parameters
export default async (request)=>{
console.log(request)
return request.headers;
}
request.auth
- Authentication information
request.events
- Request events
request.headers
- Get request headers
request.info
- Get information
request.isInjected
- If equal to
true
, it came from an internalserver.inject()
request
request.logs
- An array containing logged request events
request.method
- Request method, lowercase
request.mime
- The parsed content-type header. Only available if payload parsing is enabled and no payload errors occurred.
request.orig
- An object containing the values of , , and before any validation modifications made. Only set when performing input validation
request.params
- An object where each key is a path parameter name with a matching value, as described in Path Parameters.
request.paramsArray
- An array containing all path values in the order they appear in the path
request.path
- The pathname of the request URI
request.payload
- The request payload based on routes and settings
request.plugins
- Plugin-specific state. Provides a place to store and pass request-level plugin data. This is an object where each key is a plugin name and the value is state
request.pre
- An object where each key is a name assigned by a route preprocessor method function. The values are the original values provided as arguments to the continuation function. For a wrapped response object, use
request.response
- The response object after settings. This object may be modified, but other objects may not be assigned to it. To replace a response with another one in an extension point, return the new response value. Contains errors if the request terminated prematurely when the client disconnected.
request.preResponses
- Same response object as created by the pre method, but represented as a response object
request.query
- An object where each key is a query parameter name and each matching value is either a parameter value or an array of values if the parameter is repeated. Can be modified indirectly via request.setUrl
request.raw
- An object containing a Node HTTP server object. Direct interaction with these primitives is not recommended
request.route
- Request route information object
request.server
- Server object
request.state
- An object containing parsed HTTP state information (cookies), where each key is a cookie name and the value is the matching cookie content processed using any registered cookie definitions
request.url
- Parsed request URI