Curl - Could not resolve proxy: POST(while running curl script for watson document conversion)

Rex picture Rex · Jul 10, 2017 · Viewed 17.7k times · Source

I'm running a curl script for html document conversion with a html file config. Below is the code:

curl -x POST -u "Username":"Password" -F "[email protected]" -F "[email protected];type=text/html" "https://gateway.watsonplatform.net/document-conversion/api/v1/index_document?version=2015-12-15"

I'm getting error - Could not resolve proxy: POST. If anyone could help on this please?

Note - I have curl 7.46 installed

Answer

Kangwei Xiao picture Kangwei Xiao · Aug 1, 2018

I am learning curl recently and encountered this as well. Actually, the reason is that the -x should be replaced by -X.