import requests
r2=requests.request('put','http://httpbin.org/put',data='wangluo210102')
d3={'banji':'wangluo210102'}
#print(r2.text)
r3=requests.post('http://httpbin.org/post',data=d3)
#print(r3.text)
d4={'姓名':{'现用名':'刘国立','曾用名':'刘国光'},'性别':'男','爱好':['篮球','足球']}
print(d4['姓名'])
print(type(d4['姓名']))
print(d4['爱好'][1])
r4=requests.post('http://httpbin.org/post',data=d4)
#print(r4.text)
import requests
d={'banji':'wangluo210102'}
r = requests.put('http://httpbin.org/put', params=d)
print(response.status_code)
print(r.url)
输出:
200
http://httpbin.org/put?wangluo210102
---
import requests
d={'banji':'wangluo210102'}
r = requests.put('http://httpbin.org/put', params=d)
print(response.status_code)
print(r.url)
输出:
200
http://httpbin.org/put?banji=wangluo210102
标签:httpbin,11.08,学习,put,org,print,http,requests
From: https://www.cnblogs.com/guoli0628/p/18534373