Skip to content

Instantly share code, notes, and snippets.

@muxueqz
Created June 30, 2015 06:18
Show Gist options
  • Save muxueqz/d873f4ddb76197adb7e1 to your computer and use it in GitHub Desktop.
Save muxueqz/d873f4ddb76197adb7e1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
import urllib
import urllib2
import json
data = {'test': 'value'}
data = json.dumps(data)
url = "http://10.20.72.96:8181/api/send/5556?gm_url=http://192.168.65.156:9002/sendmail&menu_id=1"
#data = urllib.urlencode(data)
req = urllib2.Request(url, data)
res_data = urllib2.urlopen(req)
res = res_data.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment