I'm trying to update the expiry time to extend an API session from a RESTful service. However, I am having trouble getting the restful server to acknowledge that the time has been updated. I've used the requests module in python to facilitate the request and to update the cookie, or cookiejar. It shows that the cookie object expiry time has been updated by going: for cookie in session.cookies: cookie.expires = some_integer
. However, in the response headers of the get request it shows the expiry time is the original time, not the one I updated in the session.cookie
object. Is there a specific way this has to be done or is there some special trick? Or perhaps maybe it's not allowed?
After initial authentication of the restful service -> receive 2 cookies in python session object from the server.
I then attempt to update the cookie by going cookie.expires = some integer, iterating over each cookie in the session.cookies object. Thus, the same path and syntax should still be intact, as I've only touched the expiry time.
I attempt to perform another GET request against the restful service, however, the response headers show that the expiry time hasn't been changed as one would hope.