import urllib2
import json
srcdata = {"cmd":1,"fromid":"1000","toid":"2000","msg":"。。。。。。。。。。。"}
url = 'http://192.168.0.144:8080'
data = json.dumps(srcdata)
request =urllib2.Request(url,data)
opener=urllib2.build_opener()
opener.addheaders = []
stream = opener.open(request)
html = stream.read()
print html
python pos 一段json内容
最新推荐文章于 2024-08-14 17:48:26 发布