mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 14:50:16 +00:00
Change variable '_r' to 'r' for consistency.
This commit is contained in:
@@ -260,11 +260,11 @@ reference::
|
||||
If we made a bad request (non-200 response), we can raise it with
|
||||
:class:`Response.raise_for_status()`::
|
||||
|
||||
>>> _r = requests.get('http://httpbin.org/status/404')
|
||||
>>> _r.status_code
|
||||
>>> r = requests.get('http://httpbin.org/status/404')
|
||||
>>> r.status_code
|
||||
404
|
||||
|
||||
>>> _r.raise_for_status()
|
||||
>>> r.raise_for_status()
|
||||
Traceback (most recent call last):
|
||||
File "requests/models.py", line 832, in raise_for_status
|
||||
raise http_error
|
||||
|
||||
Reference in New Issue
Block a user