mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
4847f5b8cd
This saves having to wrap the call to requests with
`contextlib.closing()`, allowing it to be used directly in a
`with` statement, like so:
```
with requests.get('http://httpbin.org/get', stream=True) as r:
# Do things with the response here.
```
Fixes #4136.