Merge pull request #4390 from alexwlchan/ok-docs

[docs; tiny] Clarify that Response.ok will *only* return True/False
This commit is contained in:
Ian Stapleton Cordasco
2017-11-20 07:18:00 -06:00
committed by GitHub
+2 -2
View File
@@ -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: