mirror of
https://github.com/kennethreitz/requests3.git
synced 2026-06-05 23:10:16 +00:00
52bc2e57c0
Many people expect to be able to say:
response = make_request(url)
if response:
body = response.content
Where the first part should test for whether or not response is None.
Instead, the __bool__ and __nonzero__ methods return response.ok, so if
the response is actually a 4xx or 5xx response, then the user would
expect to get the body of the response.
By removing these methods, we restore the functionality that most users
expect.
Closes #2002