我正在尝试将 cURL 命令转换为 python,但我正在努力
curl -I --user username:password https://an.api.on.the.internet/
我目前的尝试是:
import requests
cur = requests.get('https://an.api.on.the.internet', auth='username:password')
谁能帮我转换一下?谢谢
最佳答案
关于python - 将 Curl "-I --user"转换为 Python 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18363556/