Skip to content

Instantly share code, notes, and snippets.

@TravelingTechGuy
Created August 28, 2011 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TravelingTechGuy/1176329 to your computer and use it in GitHub Desktop.
Save TravelingTechGuy/1176329 to your computer and use it in GitHub Desktop.
Test JSON service using python
import urllib2
import json
url = '<INSERT URL>'
data = {
'aaa': '7673336666',
'bbb': ['4544444445','xxxxxxx','334tttt890'],
'ccc': {
'ddd': 'on',
'eee': 5
}
}
jdata = json.dumps(data)
response = urllib2.urlopen(url, jdata)
result = response.read()
print result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment