import requests from baseDatas import userAgents data = {"a":2, "b":"abc"} headers = {"User-Agent": userAgents[2]} res = requests.post(url, data=data, headers = headers) print("请求头:%s" %res.request.headers) print("响应头:%s" %res.headers)
互联网编程技术分享
import requests from baseDatas import userAgents data = {"a":2, "b":"abc"} headers = {"User-Agent": userAgents[2]} res = requests.post(url, data=data, headers = headers) print("请求头:%s" %res.request.headers) print("响应头:%s" %res.headers)