Skip to content

Instantly share code, notes, and snippets.

@gennad
Created June 10, 2011 08:28
Show Gist options
  • Save gennad/1018459 to your computer and use it in GitHub Desktop.
Save gennad/1018459 to your computer and use it in GitHub Desktop.
Send json POST request
import urllib2
import json
# Whatever structure you need to send goes here:
jdata = json.dumps({"username":"...", "password":"..."})
urllib2.urlopen("http://www.example.com/", jdata)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment