Reputation: 2388
I am not able to set cookies using following statements
self.request.headers['Cookie'] = 'uniqueid = ',unique_identifier
self.request.headers['Cookie'] = 'nickname = ',nickname
as self.request.cookies
is returning null dictionary in another request.
environment is python on google app engine
Upvotes: 2
Views: 1346
Reputation: 761
The WebOb Reference explains set_cookie well - if youre on a framework using the WebOb Response (not valid for Google App Engine, it uses an own Repsonse)
Upvotes: 4
Reputation: 54605
Changing the cookies in the request does nothing to the cookie on the client.
You need to set the "Set-Cookie" header in the response to the client.
You could use something like this (untested by me) Google App Engine Cookie class
Upvotes: 5