Replies: 1 comment 1 reply
-
replacing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i'm making a request for a large binary blob, and would like to return the underlying req.Body to my caller so they can drain it themselves
i'm using the following:
which lets me shuffle the response out as an error. however, due to this line:
https://github.com/carlmjohnson/requests/blob/5d11526188c82fefcbdbde64537a4ad49841cdff/core_do.go#L21
the body is closed, and reading it errors out with:
http: read on closed response body
i tried adding a
resp.Body = io.NopCloser(resp.Body)
to my handler, but that didn't work.is there a simple workaround i'm missing?
Beta Was this translation helpful? Give feedback.
All reactions