transfer-encoding chunked not handled for application/json
See original GitHub issueSummary
I am receiving JSON via chunked encoding. response.data
comes back as a string
. It is not properly parsed as the headers instruct. I would expect to get a JSON object back for res.data
.
Response Headers:
Content-Type: application/json
Transfer-Encoding: chunked, chunked
Response Data:
23\r\n
{"rejected":0,"inserted/updated":1}\r\n
0\r\n
\r\n
\r\n
Theoretically this response would also be valid:
18\r\n
{"rejected":0,"inserted/update\r\n
5\r\n
d":1}\r\n
0\r\n
\r\n
\r\n
Context
- axios version: e.g.: 0.18.0
- Environment: e.g.: node v8.10.0, High Sierra
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:24 (3 by maintainers)
Top Results From Across the Web
spring - how to handle "Transfer-Encoding=chunked" in SI ...
I am using a JSON to object transformer to convert the JSON data. But I am getting the following exception. Caused by: com.fasterxml.jackson....
Read more >How HTTP Chunked Encoding was killing a request
Transfer -Encoding: chunked - there is no content length specified, the server tells us it will send a bunch of chunks whenever it...
Read more >Transfer-Encoding - HTTP - MDN Web Docs
Chunked encoding is useful when larger amounts of data are sent to the client and the total size of the response may not...
Read more >Issue with POST request with JSON body - Axway Community
When using chunked transfer encoding, the body is sent in chunks, and each chunk is preceded by its byte size in hexadecimal, with...
Read more >KSC Open API description - Kaspersky Knowledge Base
If not, it means the type "application/json". "Content-Length" If not presented, must be header "Transfer-Encoding" with "chunked" value instead.
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
The same exception about
transfer-encoding: chunked
with axios@1.2.0, and revert to v1.1.3 will work fine.Hi @jasonsaayman , there seems to be a regression on this topic with the new 1.2.0 version. In version 1.1.3 this was still fixed but now it is broken again.