如何使用curl发送HTTP POST?

如何使用curl发送HTTP POST?,curl,cygwin,http-post,google-search-appliance,Curl,Cygwin,Http Post,Google Search Appliance,我正在尝试访问Google Search Appliance API: 为了发送请求,我使用curl。我的问题是,当我尝试登录时,使用 curl -k -X POST https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&Passwd=password 我得到以下信息: 'Email' is not recognized as an internal or external command, operable

我正在尝试访问Google Search Appliance API:

为了发送请求,我使用curl。我的问题是,当我尝试登录时,使用

curl -k -X POST https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&Passwd=password
我得到以下信息:

'Email' is not recognized as an internal or external command,
operable program or batch file.
Passwd: unknown user =password
对此问题的任何帮助都将不胜感激。我不熟悉卷发,所以我意识到我可能用错了


我已通过cygwin在Windows 7上安装了curl。

请尝试将您的URL包含在内。由于您使用&和其他特殊bash字符,因此需要将它们括在引号中

这是一个bash问题:

$ curl -k -X POST "https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&Passwd=password"

请尝试将您的URL包含在中。由于您使用&和其他特殊bash字符,因此需要将它们括在引号中

这是一个bash问题:

$ curl -k -X POST "https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&Passwd=password"

shell将&字符解释为命令的结尾:您需要将整个URL放在引号中

curl -k -X POST "https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&"

shell将&字符解释为命令的结尾:您需要将整个URL放在引号中

curl -k -X POST "https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&"

我很确定你必须按照

curl -k -X POST https://ip.ad.dr.ess:8443/accounts/ClientLogin -d Email=username -d Passwd=passwd
有关命令选项的列表,请参见

我很确定你必须按照

curl -k -X POST https://ip.ad.dr.ess:8443/accounts/ClientLogin -d Email=username -d Passwd=passwd
有关命令选项的列表,请参见