#post userinfo={'username':'jack','password':'123456'} r=requests.post('http://httpbin.org/post',data=userinfo) print(r.text)
输出结果
"C:Program FilesAnaconda3python.exe" "D:/pycharm/test2/python gaoji.py" { "args": {}, "data": "", "files": {}, "form": { "password": "123456", "username": "jack" }, "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "close", "Content-Length": "29", "Content-Type": "application/x-www-form-urlencoded", "Host": "httpbin.org", "User-Agent": "python-requests/2.11.1" }, "json": null, "origin": "114.252.235.73", "url": "http://httpbin.org/post" }