How to display request headers with command line curl

后端 未结 9 707
一整个雨季
一整个雨季 2020-11-28 17:19

Command line curl can display response header by using -D option, but I want to see what request header it is sending. How can I do that?

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 18:03

    The verbose option is handy, but if you want to see everything that curl does (including the HTTP body that is transmitted, and not just the headers), I suggest using one of the below options:

    • --trace-ascii - # stdout
    • --trace-ascii output_file.txt # file

提交回复
热议问题