Commit 6239f57
committed
Set
This commit changes the way `isBase64Encoded` attribute is set for the
Lambda HTTP response. Currently, it is hardcoded to `false` which
prevents an API endpoint from returning binary data to the caller. The
problem is that Lambda uses this attribute to signal API Gateway that
the response is base64 encoded which is then used by API Gateway to
possibly convert the response payload to binary before sending it back
to the caller.
I think the change is safe because it doesn't actuate any change in
isolation: an API Gateway must first be configured to convert a base64
encoded payload into binary. This setting is the `Binary media types`
which indicates which `content-type` should be treated as binary (both
from client and server side). More information can be found at
https://docs.aws.amazon.com/apigateway/latest/developerguide/lambda-proxy-binary-media.html.isBase64Encoded based on HTTP response body type1 parent 22d998d commit 6239f57
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
0 commit comments