Update Cookies in Session Using python-requests Module
问题 I'm using python-requests module to handle oAuth request and response. I want to set received access_token (response content as dict ) in requests.session.cookies object. How can I update existing cookies of session with received response from server? [EDIT] self.session = requests.session(auth=self.auth_params) resp = self.session.post(url, data=data, headers=self.headers) content = resp.content I want to do something like: requests.utils.dict_from_cookiejar(self.session.cookies).update