i would like to make a urllib2 call in one of my controllers and for it
to pass a cookie from pythons in the request.

my workaround has been to just POST the value of the cookie, but for
various reasons i would like to put the cookie in the request (as
urllib2 allows).

I've been unsuccessful at recreating the cookie, and thought maybe if I
could locate the cookie object that pylons has access to (rather than
just the request.cookie dict), i would just pass that along.

in python, here is what i am trying to do
------------------------------------------------------------------
import urllib2, cookielib

c = find_the_pylons_cookie["name"]
j = cookielib.CookieJar()

j.set_cookie(c)

h = urllib2.build_opener(urllib2.HTTPCookieProcessor(j))

h.open("http://www.example.com/is_my_cookie_correct";)
-------------------------------------------------------------------

i've tried and failed with SimpleCookie and a few other approaches, so
any advice would be appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to