Commit 41eba32a authored by Andrew Buddenberg's avatar Andrew Buddenberg
Browse files

Got basic GET request working

parent db2c4144
#!/usr/bin/python
import urllib
import urllib2
import json
url = 'http://data.gcis-test-front.joss.ucar.edu/report/nca3draft/figure'
#user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
values = {}
headers = {'Accept' : 'application/json' }
params = urllib.urlencode({'all':'1'})
url += '?' + params
data = urllib.urlencode(values)
req = urllib2.Request(url, None, headers)
response = urllib2.urlopen(req)
figure_listing = json.load(response)
for entry in figure_listing:
print entry['identifier']
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment