Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,6 @@ to the integration request mapping, separating headers by a `:`. For example:

Remember, don't forget the `,`. Then do the same as you did for Content-Type in the
header mapping, e.g. `integration.response.body.Set-Cookie`.


For JSON body posts, add the line `"body": $input.json('$'),` into the integration request mapping.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ function mapEvent( event){
}
request.pathParams = parseParamString(event.pathParams);

if (event.body) {
//if json body, then load it in;
//depends on requestTemplates line: "body": $input.json('$')
request.body = event.body;
request._body = true;
}

request.method = event["http-method"];
request.url = reconstructUrl(event['resource-path'],request);
delete request.allParams;
Expand Down