-
Notifications
You must be signed in to change notification settings - Fork 239
Additional HTTP event and response objects. #320
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
Conversation
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.
Thanks @msailes for the contribution!!
Arguments.of("api_gateway_payload_format_v2_request.json", LambdaHTTPEvent.class), | ||
Arguments.of("http_response.json", LambdaHTTPResponse.class) |
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.
These events should also be compatible with APIGatewayV2HTTPEvent
and APIGatewayV2HTTPResponse
correct? Could you please add those assertions in as well?
(nit: move these lines further up to preserve alphabetical ordering)
@@ -0,0 +1,44 @@ | |||
{ |
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.
Why did you opt to name this file api_gateway_*
v/s a more generic http_response
for the response file?
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.
The docs for function urls specifically call out that the format is the same as Amazon API Gateway payload format version 2.0. So I thought that was a good name, given there are other very similar events.
For ref. here is the equivalent change in the Go lib: aws/aws-lambda-go#436 |
...-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/LambdaHTTPEvent.java
Outdated
Show resolved
Hide resolved
...va-events/src/main/java/com/amazonaws/services/lambda/runtime/events/LambdaHTTPResponse.java
Outdated
Show resolved
Hide resolved
After speaking to @bmoffatt I've changed the implementation to match the implementation written for Go. |
Tested on AWS |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.