diff --git a/src/requests/models.py b/src/requests/models.py index 2d043f59cf..e158b6cca2 100644 --- a/src/requests/models.py +++ b/src/requests/models.py @@ -811,8 +811,10 @@ def iter_content(self, chunk_size=1, decode_unicode=False): chunks are received. If stream=False, data is returned as a single chunk. - If decode_unicode is True, content will be decoded using the best - available encoding based on the response. + If decode_unicode is True, content will be decoded using encoding + information from the response. If no encoding information is available, + bytes will be returned. This can be bypassed by manually setting + `encoding` on the response. """ def generate(): @@ -863,6 +865,9 @@ def iter_lines( stream=True is set on the request, this avoids reading the content at once into memory for large responses. + The decode_unicode param works the same as in `iter_content`, with the + same caveats. + .. note:: This method is not reentrant safe. """