diff --git a/README.md b/README.md index 88490ab..725c5cb 100644 --- a/README.md +++ b/README.md @@ -394,6 +394,9 @@ The `REQUEST` object contains a parsed and normalized request from API Gateway. - `rawBody`: If the `isBase64Encoded` flag is `true`, this is a copy of the original, base64 encoded body - `route`: The matched route of the request - `requestContext`: The `requestContext` passed from the API Gateway +- `pathParameters`: The `pathParameters` passed from the API Gateway +- `stageVariables`: The `stageVariables` passed from the API Gateway +- `isBase64Encoded`: The `isBase64Encoded` boolean passed from the API Gateway - `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. - `namespace` or `ns`: A reference to modules added to the app's namespace (see [namespaces](#namespaces)) - `cookies`: An object containing cookies sent from the browser (see the [cookie](#cookiename-value-options) `RESPONSE` method) diff --git a/lib/request.js b/lib/request.js index 0323ca8..db6f584 100644 --- a/lib/request.js +++ b/lib/request.js @@ -93,6 +93,15 @@ class REQUEST { // Set the requestContext this.requestContext = this.app._event.requestContext || {} + // Set the pathParameters + this.pathParameters = this.app._event.pathParameters || {} + + // Set the stageVariables + this.stageVariables = this.app._event.stageVariables || {} + + // Set the isBase64Encoded + this.isBase64Encoded = this.app._event.isBase64Encoded || {} + // Add context this.context = this.app.context && typeof this.app.context === 'object' ? this.app.context : {}