Open aljones15 opened 2 years ago
This library fails if a route returns the following headers:
'content-type' => 'application/json; charset=utf-8 and 'content-encoding' => 'gzip',
'content-type' => 'application/json; charset=utf-8
'content-encoding' => 'gzip',
In this case the response.body is gzipped json. We need to support compressed response.bodies.
Note: Axios has an existing decompress function that appears to use zlib to automatically inflate compressed response.bodies.
decompress
zlib
Axios code here:
https://github.com/axios/axios/blob/738fa63661a7a5d7e8bf604436bb3b91648e327b/lib/adapters/http.js#L376-L401
EDIT: content-encoding is part of the fetch spec so it appears that something is broken in node 18.8-18.9 that is causing this issue somewhere down the line. Close this issue when content-encoding is working again.
content-encoding
We should close this if we don't have a test to run to determine whether there's a problem.
This library fails if a route returns the following headers:
'content-type' => 'application/json; charset=utf-8
and'content-encoding' => 'gzip',
In this case the response.body is gzipped json. We need to support compressed response.bodies.
Note: Axios has an existing
decompress
function that appears to usezlib
to automatically inflate compressed response.bodies.Axios code here:
https://github.com/axios/axios/blob/738fa63661a7a5d7e8bf604436bb3b91648e327b/lib/adapters/http.js#L376-L401
EDIT:
content-encoding
is part of the fetch spec so it appears that something is broken in node 18.8-18.9 that is causing this issue somewhere down the line. Close this issue whencontent-encoding
is working again.