-
Notifications
You must be signed in to change notification settings - Fork 119
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
response body is compressed in the retry function I provided #413
Comments
The reason it works like this is |
I think just mentioning this in the docs could be enough. |
I just stumbled on another case related to decompression: errors raised for uncompressed responses look cryptic. Here's what I am doing:
I understand the error happens due to how steps are ordered here. And am able to work around it simply by setting decompression as the first step, like this: Req.new()
|> Req.Request.prepend_response_steps(decompress: &Req.Steps.decompress_body/1) It would be nice to have this mentioned in the docs somewhere (for example a note for (my problem seems only mildly related to the topic here, but I wasn't sure if it warrants a GH issue of its own) |
I am doing this
and inside my
maybe_retry/2
function, when I try to access theresponse.body
, the content is compressed.After I do this below, it works.
I assumed that the body will be already decompressed as it is in the result of the
Req.new()
call. Am I mistaken or is this a bug?The text was updated successfully, but these errors were encountered: