You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,12 @@ Lambda Proxy Integration is an option in API Gateway that allows the details of
117
117
118
118
The API automatically parses this information to create a normalized `REQUEST` object. The request can then be routed using the APIs methods.
119
119
120
+
## Install
121
+
122
+
```
123
+
npm i lambda-api --save
124
+
```
125
+
120
126
## Configuration
121
127
122
128
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.
161
167
-`method`: The HTTP method of the request
162
168
-`path`: The path passed in by the request
163
169
-`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)
165
172
-`body`: The body of the request.
166
173
- If the `Content-Type` header is `application/json`, it will attempt to parse the request using `JSON.parse()`
167
174
- 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