#coding=utf-8
import requests
import json
url_login, url_test = "http://192.168.0.162/login","http://192.168.0.162/getinfo"
login_data = {'user': 'abc', 'psw': 123}
r = requests.post(url_login, data=login_data)
_cookies = r.cookies
test_data={'num':'abc123',"name":u"张三"}
r = requests.get(url_test, cookies=_cookies,data=test_data)
res_value=r.json()
d1 = json.dumps(res_value,sort_keys=True,ensure_ascii=False,indent=4)
print u'返回结果:'
print d1