Skip to content

Commit 9ee79db

Browse files
committed
add request context documentation
1 parent 2d045cf commit 9ee79db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ The `REQUEST` object contains a parsed and normalized request from API Gateway.
321321

322322
- `app`: A reference to an instance of the app
323323
- `version`: The version set at initialization
324+
- `id`: The awsRequestId from the Lambda `context`
324325
- `params`: Dynamic path parameters parsed from the path (see [path parameters](#path-parameters))
325326
- `method`: The HTTP method of the request
326327
- `path`: The path passed in by the request including the `base` and any `prefix` assigned to routes
@@ -337,6 +338,7 @@ The `REQUEST` object contains a parsed and normalized request from API Gateway.
337338
- `auth`: An object containing the `type` and `value` of an authorization header. Currently supports `Bearer`, `Basic`, `OAuth`, and `Digest` schemas. For the `Basic` schema, the object is extended with additional fields for username/password. For the `OAuth` schema, the object is extended with key/value pairs of the supplied OAuth 1.0 values.
338339
- `namespace` or `ns`: A reference to modules added to the app's namespace (see [namespaces](#namespaces))
339340
- `cookies`: An object containing cookies sent from the browser (see the [cookie](#cookiename-value-options) `RESPONSE` method)
341+
- `context`: Reference to the `context` passed into the Lambda handler function
340342

341343
The request object can be used to pass additional information through the processing chain. For example, if you are using a piece of authentication middleware, you can add additional keys to the `REQUEST` object with information about the user. See [middleware](#middleware) for more information.
342344

0 commit comments

Comments
 (0)