我正在尝试在命令行上使用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>'然而,我一直收到以下错误:
< was unexpected at this time.我应该如何键入xml数据?
发布于 2013-06-14 20:59:20
重定向符号可以通过将它们放在双引号"中进行转义。
而不是说
'<gateway><gateway_type>test</gateway_type></gateway>'你需要说
"<gateway><gateway_type>test</gateway_type></gateway>"https://stackoverflow.com/questions/17106996
复制相似问题