From CherryPy documentation, there seems to be only one cookie slot. Here's my example code
def sendCookie(self):
cookie = cherrypy.response.cookie
cookie['name'] = 'Chips Ahoy!'
return 'Cookie is now in your hands.'
sendCookie.exposed = True
I want to set multiple cookies. I'm thinking along these lines, but of course this will just overwrite the first setting.
def sendCookie(self):
cookie = cherrypy.response.cookie
cookie2 = cherrypy.response.cookie
cookie['name'] = 'Chips Ahoy!'
cookie2['name'] = 'Chocolate Chips'
return 'Cookie is now in your hands.'
sendCookie.exposed = True
How do I set multiple cookies with CherryPy?
cookie2
.cookie1
is nowhere to be found. – Sidell