joelondon
11/6/2017 - 12:29 PM

python 2 server-side script to use when browser js can't talk to another domain

python 2 server-side script to use when browser js can't talk to another domain

# python 2
# check web server can process python as cgi scripts
print "Status: 200 OK"
print "Content-Type: application/json;"
print
import urllib
url = 'https://etc.etc.etc'
print(urllib.urlopen(url).read())