diff options
| author | Alex Chan <alex@alexwlchan.net> | 2017-11-20 09:16:35 +0000 |
|---|---|---|
| committer | Alex Chan <alex@alexwlchan.net> | 2017-11-20 09:16:35 +0000 |
| commit | 775cde0914265d7dab2bc2501ed7abe6b85c4bae (patch) | |
| tree | 6b4b98e2d61ca012ba620696f27cb5c49b59aefe /requests | |
| parent | c3f2553114fdaf83b9c646a73987bbd2f13285e1 (diff) | |
| download | python-requests-775cde0914265d7dab2bc2501ed7abe6b85c4bae.tar.gz | |
Clarify that Response.ok will *only* return True/False
Diffstat (limited to 'requests')
| -rw-r--r-- | requests/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/requests/models.py b/requests/models.py index 4041cac3..ce4e284e 100644 --- a/requests/models.py +++ b/requests/models.py @@ -686,11 +686,11 @@ class Response(object): @property def ok(self): - """Returns True if :attr:`status_code` is less than 400. + """Returns True if :attr:`status_code` is less than 400, False if not. This attribute checks if the status code of the response is between 400 and 600 to see if there was a client error or a server error. If - the status code, is between 200 and 400, this will return True. This + the status code is between 200 and 400, this will return True. This is **not** a check to see if the response code is ``200 OK``. """ try: |
