lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.03k
stars
198
forks
source link
Standard library example bugged or unclear, response always text/plain #116
The example for the standard library seems to always return as text/plain regardless of what I try. I have tried a few implementations, my recent attempt is below. Even when setting the header directly, the response header is always text/plain.
The body is always correct (that is to say it is valid json in the body), it seems to only be the header. This is confusing compared to docs which seem to indicate this is inferred when the response has json. I can use the payload v2 type directly, but that feels cumbersome when this should (?) work.
Additionally when I test the lambda locally or in the lambda console, it works as expected.
The example for the standard library seems to always return as
text/plain
regardless of what I try. I have tried a few implementations, my recent attempt is below. Even when setting the header directly, the response header is alwaystext/plain
.The body is always correct (that is to say it is valid json in the body), it seems to only be the header. This is confusing compared to docs which seem to indicate this is inferred when the response has json. I can use the payload v2 type directly, but that feels cumbersome when this should (?) work.
Additionally when I test the lambda locally or in the lambda console, it works as expected.
I am deploying this via cdk...