kennethreitz/requests — pull request #595 by reclosedev (2012-05-08 09:19:50+00:00)
Title: Session cookies not saved when Session.request is called with return_response=False

For example, I want to use ``request.async`` and save cookies to session:

import requests
from requests import async

s = requests.Session()
async.map([async.get('http://httpbin.org/cookies/set/async/yes', session=s)])
print 'cookies:', s.cookies

cookies are empty.
It's because when ``Session.request()`` is called with ``return_response=False``, it returns request without updating session cookies [sessions.py#L234](https://github.com/kennethreitz/requests/blob/develop/requests/sessions.py#L234)

So, I think we can solve it by moving cookies saving logic to ``Request._build_response()``. Or maybe there is more suitable place?