Skip to content
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

[Feature request or doc oversight?] Apparently, there's still no way to read uncompressed content as file-like object #465 #6275

Open
ell1e opened this issue Nov 4, 2022 · 0 comments

Comments

@ell1e
Copy link

ell1e commented Nov 4, 2022

This was originally discussed here: #465 For some reason the ticket was however closed without a file-like object approach being added here: https://requests.readthedocs.io/en/latest/user/quickstart/ (Other than the somewhat odd .raw that returns something I suspect most people that just want a file-like stream aren't interested in.) There doesn't seem to be an explanation why that ticket was closed, and the discussion suggesting something was fixed but I can't really figure out what.

Since it's not that easy to wrap iter_content() to a file like object with arbitrary read amounts and just wrapping .content for that generically seems to be unsafe to me due to denial of service, it would be nice if this was provided and then documented here: https://requests.readthedocs.io/en/latest/user/quickstart/ (With a section alike to "Raw Response Content".)

The requests version I tested on is: 2.27.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant