Skip to content
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

Closed
erny opened this issue Oct 21, 2020 · 5 comments
Closed

implement response.ok like requests.get().ok #5099

erny opened this issue Oct 21, 2020 · 5 comments

Comments

@erny
Copy link

erny commented Oct 21, 2020

🐣 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

@asvetlov
Copy link
Member

If you want to provide a pull request -- please go ahead

@Fogapod
Copy link
Contributor

Fogapod commented Oct 21, 2020

@Fogapod
Copy link
Contributor

Fogapod commented Oct 21, 2020

Actually, this was implemented already? #4711

@asvetlov
Copy link
Member

Ooh, yes.
I've forgotten about it.
Please wait for the next release.

@erny
Copy link
Author

erny commented Oct 21, 2020

Thanks a lot. Sorry, I didn't see it. Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants