Skip to content
Myr

add response.reason

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

#588

authored by Kenneth Reitz · committed by Kenneth Reitz · parent f5d1d0d · Browse files · 1 file+5 added−0 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:requests/models.py+5 added
813 unmodified lines
814 return json.loads(self.text or self.content)815 except ValueError:816 return None817818 @property819 def reason(self):820 """The HTTP Reason for the response."""821 return self.raw.reason822823 def raise_for_status(self, allow_redirects=True):824 """Raises stored :class:`HTTPError` or :class:`URLError`, if one occurred."""825826 if self.error:
16 unmodified lines