specified encoding unsupported
See original GitHub issueHi, I’m a beginner with nodejs/expressjs and try to run a POST request with body-parser middleware as:
app.use(bodyParser.json({
inflate: true
}));
app.use(bodyParser.urlencoded({ extended: true, inflate: true }));
but get the error: “specified encoding unsupported”.
the response headers: Connection →keep-alive Content-Length →176 Content-Type →application/json; charset=utf-8 Date →Thu, 06 Oct 2016 06:58:56 GMT X-Powered-By →Express
any idea what had I missed?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
415 Unsupported Media Type - Unsupported Encoding
This error occurs if the value of the Content-Encoding header specified either in the HTTP request sent by the client to Apigee or...
Read more >unsupported encoding: UTF-8 - Stack Overflow
You actually specify encoding="UTF-8 " . Note the trailing space. Remove that space, by changing it to encoding="UTF-8" .
Read more >415 Unsupported Media Type - HTTP - MDN Web Docs
The HTTP 415 Unsupported Media Type client error response code indicates that the server refuses to accept the request because the payload ...
Read more >java.io.UnsupportedEncodingException in Java with Examples
The java.io.UnsupportedEncodingException occurs when an unsupported character encoding scheme is used in java strings or bytes.
Read more >TO_BYTES() fails with "9134 Unsupported ENCODING type ...
TO_BYTES() fails with "9134 Unsupported ENCODING type" though valid ENCODING specified Sample SQL: select 'Markus' , char2hexint('Markus') ...
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
Hi @greyd we do support allowing the charset to be set in the content-type header, but the header you posted above is actually invalid per the HTTP RFC, you need to remove that trailing
;
character, as it signals the start of a new parameter, but since none follows, the assumption is that the header has been truncated.@dougwilson That works. I never thought that this semicolon could be a problem. Thanks for the explanation.