-
Notifications
You must be signed in to change notification settings - Fork 437
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
[Node] HTTP response with a native Buffer object results gives base64 #814
Labels
Comments
This was referenced Oct 25, 2016
We definitely have some work to do with content negotiation in node, was just talking about this with @fabiocav yesterday. I'll play around with this scenario in express & functions and figure out a consistent behavior |
With an Express adapter: https://github.com/yvele/azure-function-express no need to worry about content negotiation 😉 |
This was referenced Nov 22, 2016
This was referenced Nov 28, 2016
👍 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Repro steps
PS: I also set
content-type
toapplication/json; charset=utf-8
Expected behavior
A or B?
A. Decoded buffer
Decoded buffer should be output
This solution is maybe the best as you are already planing to add ExpressJS style API for HTTP responses: #781 #160
B. An explicit error message
Should throw an explicit error message like a TypeError
Actual behavior
HTTP output is:
dXNpbmcgYSBidWZmZXI=
Known workarounds
Related information
I'm using my own small connect adaptor for Azure Function (working like a charm) that allows me to use express and all available middlewares. That's why I found this issue.. some middlewares are directly dealing with Buffers
edit: confirmed by @mamaso that buffer should be supported
The text was updated successfully, but these errors were encountered: