如何在 curl.exe 的 -d 参数中发送双引号? [英] How to send double quote in -d parameter for curl.exe?
问题描述
如何在 -d
参数中使用 curl.exe 发送双引号字符.我不想对双引号进行 URL 编码.由于 -d
数据需要用双引号括起来,我似乎无法让它工作.
How can I send a double quote char using curl.exe in the -d
parameter. I don't want to URL encode the double quote. Since the -d
data needs to be surrounded in double quotes, I cannot seem to get it to work.
或者 curl.exe 是否有另一个标志告诉它对整个表单发布数据使用文件内容?
Or is there another flag for curl.exe that tells it to use a files contents for the whole form post data?
推荐答案
你当然可以转义双引号.你如何做到这一点取决于你的操作系统和外壳,你没有指定.在 Windows 上,您可以使用 ^ 作为转义字符.
You can most certainly escape double quotes. How you do that depends on your operating system and shell, which you fail to specify. On Windows, you'd use the ^ as the escape character.
您也可以这样做:
curl [...] -d @filename
...从名为 filename 的文件中读取帖子数据.
...which reads post data from a file called filename.
Google 和/或 man 是您的朋友.
Google and/or man is your friend.
http://curl.haxx.se/docs/manpage.html
这篇关于如何在 curl.exe 的 -d 参数中发送双引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!