#含有参数的post请求 r = requests.post(url,data=data,params=params)

#含有参数的post请求 r = requests.post(url,data=data,params=params)
import requests
url = "https://httpbin.org/post"

params = {"show_env":1}
data = {"a":"巧吧软件测试","form":"form_data"}

r = requests.post(url,params=params,data=data)
print(r.headers)
print(r.text)
print(r.json()["form"])
posted @ 2018-12-24 23:33  测试小白学习之路  阅读(5118)  评论(0编辑  收藏  举报