Fail to get binary data.
See original GitHub issue(Region : ap-northeast-2, seoul)
What I did
- Set API Gateway Binary Support, case of Conetent-type : application/octet-stream.
- Add binary types parameter on
createServer
fromaws-serverless-express
- Set request header
Accept
withapplication/octet-stream
. - Send binary data like
res.send(data);
. I checkedisBase64Encoded
istrue
.
What I expected
I expected to got binary data that decoded by api gateway
What I actually got
I got base64 encoded values.
And also, when I revert commit b61d288 , I could get binary data.
What’s wrong with me?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11
Top Results From Across the Web
Fail to get binary data. · Issue #39 · vendia/serverless-express
I checked isBase64Encoded is true . What I expected. I expected to got binary data that decoded by api gateway. What I actually...
Read more >download binary data error | OutSystems
download binary data error. Question. When trying to download attachments i get the following error. When i download the file it returns 0 ......
Read more >How to fix the error "String or binary data would be truncated"
To fix this error, patch to SQL Server 2016 SP2, CU6 or newer (including SQL Server 2017), and then turn on trace flag...
Read more >Try to read data from binary file, failed to put it in struct
I read one line into a string and wrote it into the binary file. I'm thinking that that was the problem and now...
Read more >Why am I getting a 'Binary provider has no content for' error?
A physical binary file is inaccessible or not present in the filestore. A misconfiguration of your binarystore.xml can result in Artifactory ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s true that isBase64Encoded flag is not documented for output but it’s discussed e.g. here: https://forums.aws.amazon.com/thread.jspa?messageID=759454
“For the Lambda proxy case, you can send the base64 encoded flag with your response from Lambda to tell API Gateway if your response body is base64 encoded, however, you need to send an Accept header which is defined in the binaryMediaTypes in order to receive a binary response from API Gateway”
Don’t do this
res.setHeader('isBase64Encoded')
.