Skip to content

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

Closed
wants to merge 7 commits into from
Closed

Additional HTTP event and response objects. #320

wants to merge 7 commits into from

Conversation

msailes
Copy link
Collaborator

@msailes msailes commented Mar 31, 2022

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.

Copy link
Contributor

@carlzogh carlzogh left a 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!!

Comment on lines 51 to 52
Arguments.of("api_gateway_payload_format_v2_request.json", LambdaHTTPEvent.class),
Arguments.of("http_response.json", LambdaHTTPResponse.class)
Copy link
Contributor

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 @@
{
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@carlzogh
Copy link
Contributor

carlzogh commented Apr 7, 2022

For ref. here is the equivalent change in the Go lib: aws/aws-lambda-go#436

@msailes
Copy link
Collaborator Author

msailes commented Apr 7, 2022

After speaking to @bmoffatt I've changed the implementation to match the implementation written for Go.

@msailes
Copy link
Collaborator Author

msailes commented Apr 8, 2022

Tested on AWS

@msailes msailes changed the base branch from master to events-v4-serialization-v2 August 10, 2022 08:30
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants