-
Notifications
You must be signed in to change notification settings - Fork 361
impl multi_value_headers #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
b0b605e
0cdca54
df9d820
2dd5882
57c1a0c
d527c2b
d4f085f
6833866
ec3d15d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
"resource": "/{proxy+}", | ||
"path": "/hello/world", | ||
"httpMethod": "POST", | ||
"headers": { | ||
"Accept": "*/*", | ||
"Accept-Encoding": "gzip, deflate", | ||
"cache-control": "no-cache", | ||
"CloudFront-Forwarded-Proto": "https", | ||
"CloudFront-Is-Desktop-Viewer": "true", | ||
"CloudFront-Is-Mobile-Viewer": "false", | ||
"CloudFront-Is-SmartTV-Viewer": "false", | ||
"CloudFront-Is-Tablet-Viewer": "false", | ||
"CloudFront-Viewer-Country": "US", | ||
"Content-Type": "application/json", | ||
"headerName": "headerValue", | ||
"Host": "gy415nuibc.execute-api.us-east-1.amazonaws.com", | ||
"Postman-Token": "9f583ef0-ed83-4a38-aef3-eb9ce3f7a57f", | ||
"User-Agent": "PostmanRuntime/2.4.5", | ||
"Via": "1.1 d98420743a69852491bbdea73f7680bd.cloudfront.net (CloudFront)", | ||
"X-Amz-Cf-Id": "pn-PWIJc6thYnZm5P0NMgOUglL1DYtl0gdeJky8tqsg8iS_sgsKD1A==", | ||
"X-Forwarded-For": "54.240.196.186, 54.182.214.83", | ||
"X-Forwarded-Port": "443", | ||
"X-Forwarded-Proto": "https" | ||
}, | ||
"multiValueHeaders":{ | ||
"Accept":[ | ||
"*/*" | ||
], | ||
"Accept-Encoding":[ | ||
"gzip, deflate" | ||
], | ||
"cache-control":[ | ||
"no-cache" | ||
], | ||
"CloudFront-Forwarded-Proto":[ | ||
"https" | ||
], | ||
"CloudFront-Is-Desktop-Viewer":[ | ||
"true" | ||
], | ||
"CloudFront-Is-Mobile-Viewer":[ | ||
"false" | ||
], | ||
"CloudFront-Is-SmartTV-Viewer":[ | ||
"false" | ||
], | ||
"CloudFront-Is-Tablet-Viewer":[ | ||
"false" | ||
], | ||
"CloudFront-Viewer-Country":[ | ||
"US" | ||
], | ||
"":[ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this is a documentation bug but this is what aws has documented I'm not sure what the right external channels are but you may want to leverage internal channels to notify the team that maintains these or clarify in the docs what an empty by present header name means :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question; will do. Not entirely sure myself... |
||
"" | ||
], | ||
"Content-Type":[ | ||
"application/json" | ||
], | ||
"headerName":[ | ||
"headerValue" | ||
], | ||
"Host":[ | ||
"gy415nuibc.execute-api.us-east-1.amazonaws.com" | ||
], | ||
"Postman-Token":[ | ||
"9f583ef0-ed83-4a38-aef3-eb9ce3f7a57f" | ||
], | ||
"User-Agent":[ | ||
"PostmanRuntime/2.4.5" | ||
], | ||
"Via":[ | ||
"1.1 d98420743a69852491bbdea73f7680bd.cloudfront.net (CloudFront)" | ||
], | ||
"X-Amz-Cf-Id":[ | ||
"pn-PWIJc6thYnZm5P0NMgOUglL1DYtl0gdeJky8tqsg8iS_sgsKD1A==" | ||
], | ||
"X-Forwarded-For":[ | ||
"54.240.196.186, 54.182.214.83" | ||
], | ||
"X-Forwarded-Port":[ | ||
"443" | ||
], | ||
"X-Forwarded-Proto":[ | ||
"https" | ||
] | ||
}, | ||
"queryStringParameters": { | ||
"name": "me", | ||
"multivalueName": "me" | ||
}, | ||
"multiValueQueryStringParameters":{ | ||
"name":[ | ||
"me" | ||
], | ||
"multivalueName":[ | ||
"you", | ||
"me" | ||
] | ||
}, | ||
"pathParameters": { | ||
"proxy": "hello/world" | ||
}, | ||
"stageVariables": { | ||
"stageVariableName": "stageVariableValue" | ||
}, | ||
"requestContext": { | ||
"accountId": "12345678912", | ||
"resourceId": "roq9wj", | ||
"stage": "testStage", | ||
"requestId": "deef4878-7910-11e6-8f14-25afc3e9ae33", | ||
"identity": { | ||
"cognitoIdentityPoolId": null, | ||
"accountId": null, | ||
"cognitoIdentityId": null, | ||
"caller": null, | ||
"apiKey": null, | ||
"sourceIp": "192.168.196.186", | ||
"cognitoAuthenticationType": null, | ||
"cognitoAuthenticationProvider": null, | ||
"userArn": null, | ||
"userAgent": "PostmanRuntime/2.4.5", | ||
"user": null | ||
}, | ||
"resourcePath": "/{proxy+}", | ||
"httpMethod": "POST", | ||
"apiId": "gy415nuibc" | ||
}, | ||
"body": "{\r\n\t\"a\": 1\r\n}", | ||
"isBase64Encoded": false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
took a liberty to make a small optimization here. serde's internal map model may provide a size hint for those building up deserialized maps to pre-allocate an appropriately sized map. I'm doing that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!