更新时间:2023-02-16 19:51:04
使用 -H
用于curl的句柄,您可以设置标题值.在请求中,您传递标头数据的方式与处理参数相同,但是您使用了不同的关键字.
With the -H
handle for curl, you're setting header values.
In requests, you pass header data the same way you do with the params but you use a different keyword.
headers = {'ID': '1234' , 'Password' : 'ABC' }
requests.get("http://url.com/curl", headers=headers)