-
Notifications
You must be signed in to change notification settings - Fork 669
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
Why is application/json listed as a binary media type in example project? #64
Comments
The intention was to treat most of the data as binary data not just base64 encoded. |
OK, thanks for the info! I was just surprised, because the example didn't seem to work out of the box when I deployed it to AWS Lambda. The following error was thrown when I POSTed JSON data with a Content-Type of application/json. It seems that base64-encoded data is sent to the JSON parser, and I got it to work by removing application/json from binaryMimeTypes in lambda.js and the Swagger YML. Is this the expected behavior?
|
Can you share your API setting and the request parameters? |
… showcase POST/PUT; move example instructions to example/README.md; update example to Node.js 6.10; added app.local.js to easily run local express
It's listed for gzip support. However, there is a bug in the lib where it was not encoding the request correctly. PR submitted. |
Released. Please update to version 3.0.0 |
<a name="2.1.4"></a> ## [2.1.4](v2.1.3...v2.1.4) (2018-02-09) ### Bug Fixes * decodes base64 requests (fixes [#64](#64)); added form to index view to showcase POST/PUT; move example instructions to example/README.md; update example to Node.js 6.10; added app.local.js to easily run local express ([2871acb](2871acb))
<a name="2.1.4"></a> ## [2.1.4](CodeGenieApp/serverless-express@v2.1.3...v2.1.4) (2018-02-09) ### Bug Fixes * decodes base64 requests (fixes [#64](CodeGenieApp/serverless-express#64)); added form to index view to showcase POST/PUT; move example instructions to example/README.md; update example to Node.js 6.10; added app.local.js to easily run local express ([2871acb](CodeGenieApp/serverless-express@2871acb))
Hi!
I've just spent a few hours troubleshooting a strange error I got only when deploying to AWS Lambda / API Gateway, and it turns out that it is because application/json is listed in the binaryMimeTypes collection in your example project. When I removed it, the POST and PATCH calls work just fine.
What is the reason for this, in what scenario are you interested in treating JSON input data as base64?
The text was updated successfully, but these errors were encountered: