Hi,
I am trying to set a cookie using the below. Should it not work on
localhost? I also tried localhost.localdomain.
So..did I set a cookie correct? If I go back to the page should I
then should to read the cookie?
I am a cookie newbie.
class index:
def GET(self):
env = web.ctx['environ']
qs = urlparse.parse_qs(env['QUERY_STRING'])
#Get cookie
cookie = web.cookies().get('test')
#Set cookie
web.setcookie('test', "rtb", expires=3600, domain='localhost',
secure=False)
return "<html></html>"
Thanks
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.