Created
October 24, 2012 13:24
-
-
Save aoeuidht/3946032 to your computer and use it in GitHub Desktop.
how Opera xhrproxy handle post params
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if request.method == 'POST': | |
fields = request.GET['_proxy_fields'].split(',') | |
params = {} | |
for field in fields: | |
if len(field) == 0: continue | |
params[field] = request.POST[params] | |
if request.method == 'POST': | |
data = urllib.urlencode(params) | |
else: | |
data = None | |
req = urllib2.Request(url, data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment