mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
raise_for_status is better
This commit is contained in:
+1
-1
@@ -268,7 +268,7 @@ class Response(object):
|
||||
"""Returns true if status_code is 'OK'."""
|
||||
return not self.error
|
||||
|
||||
def raise_for_response(self):
|
||||
def raise_for_status(self):
|
||||
"""Raises stored HTTPError if one exists."""
|
||||
if self.error:
|
||||
raise self.error
|
||||
|
||||
Reference in New Issue
Block a user