You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Hackney adapter allows options to be passed directly to the underlying request function. However, one option that will not work is with_body: true, which returns the body directly, and is needed for the max_body option.
The reason it won't work is that Tesla always tries to read the body from a reference:
The Hackney adapter allows options to be passed directly to the underlying request function. However, one option that will not work is
with_body: true
, which returns the body directly, and is needed for themax_body
option.The reason it won't work is that Tesla always tries to read the body from a reference:
https://github.com/teamon/tesla/blob/33417c02d082801013eb4e8a4b3cd3fa78db0d91/lib/tesla/adapter/hackney.ex#L38-L39
Passing
with_body: true
as an option to Tesla using Hackney will crash with a:req_not_found
adapter error.I believe it might be sufficient to use
is_reference/1
as a guard to know whether the body needs to be read or not.The text was updated successfully, but these errors were encountered: