1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #18523 -- Added stream-like API to HttpResponse.

Added getvalue() to HttpResponse to return the content of the response,
along with a few other methods to partially match io.IOBase.

Thanks Claude Paroz for the suggestion and Nick Sanford for review.
This commit is contained in:
Michael Kelly
2014-04-14 11:58:59 -04:00
committed by Tim Graham
parent f7969b0920
commit ebc8e79cf3
5 changed files with 93 additions and 3 deletions

View File

@@ -385,6 +385,10 @@ Requests and Responses
<django.http.HttpRequest.get_full_path>` method now escapes unsafe characters
from the path portion of a Uniform Resource Identifier (URI) properly.
* :class:`~django.http.HttpResponse` now implements a few additional methods
like :meth:`~django.http.HttpResponse.getvalue` so that instances can be used
as stream objects.
Tests
^^^^^