GET:
import urllib,urllib2
import json
def get(url):
h={"appkey":" ","Content-Type":"application/json"}
req=urllib2.Request(url = url,headers=h)
res=urllib2.urlopen(req)
ress=res.read()
POST:
import urllib,urllib2
import json
def post(url):
h={"appkey":" ","Content-Type":"application/json"}
data={'',''}
data=json.dumps(data)
req = urllib2.Request(url = url,data = data,headers=h)
res_data = urllib2.urlopen(req)
res = res_data.read()