简体   繁体   English

-d@- 在 curl 命令之后是什么意思?

[英]What does -d@- mean after a curl command?

So for example, say you have:例如,假设您有:

curl -d@- http://localhost:8000

what does each part of -d@- mean? -d@- 的每个部分是什么意思? This type of thing is difficult to google and I couldn't find any info about it in the docs or curl --help.这种类型的东西很难用谷歌搜索,我在文档或 curl --help 中找不到任何相关信息。

Thanks guys.多谢你们。

The -d@- in this command line is explained as this.此命令行中的-d@-解释如下。

-d is the Data flag defining what is sent in the POST request. -d是定义 POST 请求中发送内容的数据标志。 @ means send the file after this character as the body of the POST request. @表示将此字符之后的文件作为 POST 请求的正文发送。 - means stdin. -表示标准输入。

So -d@- means to read from stdin to send to the URL as the body of the POST request.所以-d@-表示从标准输入读取以发送到 URL 作为 POST 请求的主体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM