Skip to content
Myr

Also update requests.models.Response

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Clauss · committed by GitHub · parent 4193b95 · Browse files · 1 file+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−1 removed

  • other:+6 added−1 removed

1 file+6 added−1 removed

modified:requests/models.py+6 added-1 removed
875 unmodified lines
876 def json(self, **kwargs):877 r"""Returns the json-encoded content of a response, if any.878879 :param \*\*kwargs: Optional arguments that ``json.loads`` takes.880 :raises simplejson.JSONDecodeError: If the response body does not881 contain valid json and simplejson is installed.882 :raises json.JSONDecodeError: If the response body does not contain883 valid json and simplejson is not installed on Python 3.880 :raises ValueError: If the response body does not contain valid json.884 :raises ValueError: If the response body does not contain valid885 json and simplejson is not installed on Python 2. 886 """887888 if not self.encoding and self.content and len(self.content) > 3:889 # No encoding set. JSON RFC 4627 section 3 states we should expect
72 unmodified lines