forwarding a post in python

< 1 minute read Wanted to run some data validation on a post request, then forward that request onto a different url. Used urllib2, although it wasn’t exactly intuitive. In my python code, I receive an django.http Request object. To forward the request on, I did: |newReq=urllib2.Request(‘urlToFrwardTo’,urllib.urlencode(req.POST)) and then |urllib2.urlopen(newReq) The part that weirded me out was the why […]

Read More forwarding a post in python