使用Python 库 requests
代码实现
import requests
#simulate login
url = "http://domain/api"
values = {'username':'xxx','password':'xxx'}
r = requests.post(url,data=values)
print r.content
import requests
#simulate login
url = "http://domain/api"
values = {'username':'xxx','password':'xxx'}
r = requests.post(url,data=values)
print r.content