can anyone point out a tutorial that shows me how to do a POST request using urllib2 with the data being in JSON format?
Example - sending some data encoded as JSON as a POST data:
import json import urllib2 data = json.dumps([1, 2, 3]) f = urllib2.urlopen(url, data) response = f.read() f.close()