如何使用curl发送HTTP POST?

ewo*_*wok 1 curl cygwin http-post google-search-appliance

我正在尝试访问Google Search Appliance API:http://code.google.com/apis/searchappliance/documentation/612/gdata/acapi_protocol.html

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

curl -k -X POST https://ip.ad.dr.ess:8443/accounts/ClientLogin&Email=username&Passwd=password
Run Code Online (Sandbox Code Playgroud)

我得到以下内容:

'Email' is not recognized as an internal or external command,
operable program or batch file.
Passwd: unknown user =password
Run Code Online (Sandbox Code Playgroud)

任何有关此问题的帮助将不胜感激.我是新来的卷曲,所以我意识到我可能错了.

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

rho*_*lke 6

我很确定你必须做一些事情

curl -k -X POST https://ip.ad.dr.ess:8443/accounts/ClientLogin -d Email=username -d Passwd=passwd
Run Code Online (Sandbox Code Playgroud)

有关命令选项的列表,请参阅 http://curl.haxx.se/docs/manpage.html#-d