I just did something similar in one of my projects. Not sure if that's
exactly what you are looking for, but in my case, I am simply proxing a
full request (in order to allow an AJAX call to a resource on a
different server). When I say "full request", I mean I am passing along
the whole request parameters and cookie as-is. The following worked for
me:
from urllib import urlencode
import urllib2
url = 'http://.............'
req = urllib2.Request(url, urlencode(request.params),
{'Cookie': request.headers.get('Cookie', '')})
proxied_page = urllib2.urlopen(req)
return Response(proxied_page.read())
HTH
Cheers,
--
Yves-Eric
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---