Hacker News new | ask | show | jobs
by KTibow 414 days ago
`post` automatically releases the connection. `with` only makes sense when you use a `requests.Session()`.
1 comments

You are right! https://github.com/psf/requests/blob/c65c780849563c891f35ffc...

The post function calls request the request function which uses its own context manager that will call the close function of the connection object.