Rex
Rex

Reputation: 201

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

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

Upvotes: 18

Views: 45422

Answers (3)

yazid
yazid

Reputation: 11

  1. download and install GIT
  2. write the command curl -X, for example curl -X POST "yourwebsite.js"

Upvotes: -3

Kangwei Xiao
Kangwei Xiao

Reputation: 733

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

Upvotes: 73

Sayuri Mizuguchi
Sayuri Mizuguchi

Reputation: 5330

You error seems like one proxy config problem.

Try use --noproxy flag:

Example:

curl --noproxy 127.0.0.1 +your POST

Or try set your proxy, like my example:

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

Obs.: Use the specified HTTP proxy. If the port number isn't specified, will be 1080 for default.

Upvotes: 0

Related Questions