aws / aws-lambda-java-libs

Official mirror for interface definitions and helper classes for Java code running on the AWS Lambda platform.

Home Page:https://aws.amazon.com/lambda/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APIGatewayProxyResponseEvent.toString() broken

rudpot opened this issue · comments

  • APIGatewayProxyResponseEvent.toString() should return value for isBase64Encoded - as seen here it does not

  • APIGatewayProxyResponseEvent.toString() should return a properly formatted JSON style object. Currently headers (and probably multi-value headers, didn't test that) are displayed in "A=B, ..." format instead of "A: B, ..." format. Also string entries are not quoted, i.e. {statusCode: 200, headers: {}} should read {"statusCode": 200, "headers": {}}

The APIGatewayProxyResponseEvent will have the correct toString() method in the next major version release.

You can see the implementation on the events-v4-serialization-v2 branch.

The APIGatewayProxyResponseEvent toString() method isn't meant to return a JSON formatted string. It returns a string representation of the object for testing, logging and debugging purposes.