无法解析代理:开机自检(运行 Watson 文档转换的 curl 脚本时)



我正在运行一个带有HTML文件配置的HTML文档转换的curl脚本。下面是代码:

curl -x POST -u "Username":"Password" -F "config=@config.json" -F "file=@example.html;type=text/html" "https://gateway.watsonplatform.net/document-conversion/api/v1/index_document?version=2015-12-15"

我收到错误 -Could not resolve proxy: POST.如果有人可以帮忙吗?

注意 - 我已安装curl 7.46

我最近正在学习卷曲,也遇到了这个问题。实际上,原因是-x应该替换为-X

您的错误似乎是一个代理配置问题。

尝试使用--noproxy标志:

例:

curl --noproxy 127.0.0.1 +your POST

或者尝试设置您的代理,如我的示例:

curl --proxy <[protocol://][user:password@]proxyhost[:port]> +your POST

注意:使用指定的HTTP代理。如果未指定端口号,则默认为 1080。

  1. 下载并安装 GIT
  2. 编写命令 curl -X,例如curl -X POST "yourwebsite.js"

最新更新