【发布时间】:2017-06-06 19:48:58
【问题描述】:
有没有办法把下面的curl转换成正常的http请求?
curl --user <username>:<password> https://{username}.fred.sensetecnic.com/api/{custom_endpoint_name}
变成这样(使用 Postman 处理 http 请求)
GET https://{username}.fred.sensetecnic.com/api/{custom_endpoint_name}
Headers: Username: username, Password: password
【问题讨论】:
-
“正常的 http 请求”是什么意思?第二个 sn-p 看起来不像我见过的任何 http 请求。你读了吗:tools.ietf.org/html/rfc7617
-
抱歉,如果代码括号让您感到困惑。这不是命令行代码。我的意思是有一种方法可以使用 Headers 而不是 curl 提供的
: 。