我正在运行一个带有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。
- 下载并安装 GIT
- 编写命令 curl -X,例如
curl -X POST "yourwebsite.js"