kinlane
9/2/2013 - 2:49 PM

Python REST Sample

Python REST Sample

import urllib
import urllib2

url = 'http://www.sample.com/resource/details'
params = urllib.urlencode({
  'query': 'keyword',
  'callback': 'results'
})
response = urllib2.urlopen(url, params).read()