1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-25 00:43:59 +00:00

[Doc] Update Response.body type

This commit is contained in:
Steven Almeroth 2017-09-12 15:54:09 -04:00
parent b8fabeed86
commit 3637b75a67

View File

@ -525,11 +525,11 @@ Response objects
(for single valued headers) or lists (for multi-valued headers). (for single valued headers) or lists (for multi-valued headers).
:type headers: dict :type headers: dict
:param body: the response body. It must be str, not unicode, unless you're :param body: the response body. To access the decoded text as str (unicode
using a encoding-aware :ref:`Response subclass in Python 2) you can use ``response.text`` from an encoding-aware
<topics-request-response-ref-response-subclasses>`, such as :ref:`Response subclass <topics-request-response-ref-response-subclasses>`,
:class:`TextResponse`. such as :class:`TextResponse`.
:type body: str :type body: bytes
:param flags: is a list containing the initial values for the :param flags: is a list containing the initial values for the
:attr:`Response.flags` attribute. If given, the list will be shallow :attr:`Response.flags` attribute. If given, the list will be shallow