kennethreitz/requests — Issue #465: no way to read uncompressed content as file-like object
Author: scoder
Created: 2012-02-29 18:14:13+00:00
State: open

According to the documentation, there are three ways to read the content of the response: `.text`, `.content` and `.raw`. The first two consider the transfer encoding and decompress the stream automatically when producing their in-memory result. However, especially for the case that the result is large, there is currently no simple way to get at the decompressed result in the form of a file-like object, e.g. to pass it straight into an XML or Json parser.

From the point of view of a library that aims to make HTTP requests user friendly, why should a user have to care about something as low-level as the compression type of the stream that was internally negotiated between the web server and the library? After all, it's the library's "fault" if it defaults to accepting such a stream. In this light, the `.raw` stream is a bit too raw for my taste.

Maybe a fourth property like `.stream` might provide a better abstraction level?