Add param for max_download_size for request #2798
Unanswered
codejunction
asked this question in
Ideas
Replies: 1 comment 2 replies
-
Ok, so... We've got a bit of discussion on this here. If we did want to add this to, then I'd expect that we'd want to add it here... limits = httpx.Limits(max_download_size=...) # currently accepts `max_connections` and `max_keepalive_connections`.
client = httpx.Client(limits=limits)
... I also think we'd probably want:
Did you mean to provide a different URL there? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can we add new parameter to the get and post request to limit the max_download_size so as to limit the request timeout.
This can be achieved through stream but would be nice to have as a default options for the Client and AsyncClient in general.
It might return a status code of 413 and an empty content and text field.
My scenario
i have a bunch of url from a crawler. But few of them are file links (500mb+). Example : www.dl.example.com/35/23/patch its an executable linux binary.
i have check for file types but since this link doesn’t have application header and content length param, my container runs out of memory on this request.
Beta Was this translation helpful? Give feedback.
All reactions