简体   繁体   中英

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? This type of thing is difficult to google and I couldn't find any info about it in the docs or curl --help.

Thanks guys.

The -d@- in this command line is explained as this.

-d is the Data flag defining what is sent in the POST request. @ means send the file after this character as the body of the POST request. - means stdin.

So -d@- means to read from stdin to send to the URL as the body of the POST request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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