Skip to content

Commit a6cfb3a

Browse files
committed
update documentation with new header conversion
1 parent a751dfa commit a6cfb3a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ Lambda Proxy Integration is an option in API Gateway that allows the details of
117117

118118
The API automatically parses this information to create a normalized `REQUEST` object. The request can then be routed using the APIs methods.
119119

120+
## Install
121+
122+
```
123+
npm i lambda-api --save
124+
```
125+
120126
## Configuration
121127

122128
Require the `lambda-api` module into your Lambda handler script and instantiate it. You can initialize the API with an optional `version` which can be accessed via the `REQUEST` object and a `base` path.
@@ -161,7 +167,8 @@ The `REQUEST` object contains a parsed and normalized request from API Gateway.
161167
- `method`: The HTTP method of the request
162168
- `path`: The path passed in by the request
163169
- `query`: Querystring parameters parsed into an object
164-
- `headers`: An object containing the request headers
170+
- `headers`: An object containing the request headers (properties converted to lowercase for HTTP/2, see [rfc7540 8.1.2. HTTP Header Fields](https://tools.ietf.org/html/rfc7540))
171+
- `rawHeaders`: An object containing the original request headers (property case preserved)
165172
- `body`: The body of the request.
166173
- If the `Content-Type` header is `application/json`, it will attempt to parse the request using `JSON.parse()`
167174
- If the `Content-Type` header is `application/x-www-form-urlencoded`, it will attempt to parse a URL encoded string using `querystring`

0 commit comments

Comments
 (0)