-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement response.ok like requests.get().ok #5099
Comments
If you want to provide a pull request -- please go ahead |
Status checks: https://github.com/psf/requests/blob/143150233162d609330941ec2aacde5ed4caa510/requests/models.py#L936-L943 So it should be this if compatibility is needed? |
Actually, this was implemented already? #4711 |
Ooh, yes. |
Thanks a lot. Sorry, I didn't see it. Regards |
🐣 Is your feature request related to a problem? Please describe.
Implement requests lib response.ok for compatibility reasons
💡 Describe the solution you'd like
response.ok == (200 >= requests.status > 400) # as per requests.ok description
@Property
def ok(self):
return 200 >= self.status > 400
❓ Describe alternatives you've considered
Comparing result with status codes
📋 Additional context
The text was updated successfully, but these errors were encountered: