tesla icon indicating copy to clipboard operation
tesla copied to clipboard

Add `:max_body` to Hackney Adapter

Open thiagopromano opened this issue 2 years ago • 1 comments

To avoid filling the memory when response is huge and not expected, Hackney has an option to read the body up to a specified MaxLength.

https://github.com/benoitc/hackney/blob/3f6d481ffbf4ddacc1c7fe1614030a06f39e04cc/src/hackney_response.erl#L271

What do you think of adding this option to the Hackney adapter?

thiagopromano avatar May 06 '22 08:05 thiagopromano

Something like this: https://github.com/teamon/tesla/pull/528

thiagopromano avatar May 06 '22 08:05 thiagopromano