如何在Windows7中使用cmd发布带有cURL的XML数据?
我试图在命令行上使用curl发布一些xml数据。特别是,我正在尝试运行以下命令以连接到计费服务提供商:如何在Windows7中使用cmd发布带有cURL的XML数据?,xml,curl,cmd,Xml,Curl,Cmd,我试图在命令行上使用curl发布一些xml数据。特别是,我正在尝试运行以下命令以连接到计费服务提供商: curl https://core.spreedly.com/v1/gateways.xml \ -u 'secretKey' \ -H 'Content-Type: application/xml' \ -d '<gateway><gateway_type>test</gateway_type></gateway>'
curl https://core.spreedly.com/v1/gateways.xml \
-u 'secretKey' \
-H 'Content-Type: application/xml' \
-d '<gateway><gateway_type>test</gateway_type></gateway>'
curlhttps://core.spreedly.com/v1/gateways.xml \
-u‘秘密钥匙’\
-H'内容类型:应用程序/xml'\
-d'测试'
但是,我不断收到以下错误:
< was unexpected at this time.
<此时发生意外。
如何键入xml数据?重定向符号可以通过将它们放在双引号
“
中进行转义
而不是说
'<gateway><gateway_type>test</gateway_type></gateway>'
“测试”
你需要说
"<gateway><gateway_type>test</gateway_type></gateway>"
“测试”