How to display request headers with command line curl

后端 未结 9 712
一整个雨季
一整个雨季 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:15

    If you want more alternatives, You can try installing a Modern command line HTTP client like httpie which is available for most of the Operating Systems with package managers like brew, apt-get, pip, yum etc

    eg:- For OSX

    brew install httpie
    

    Then you can use it on command line with various options

    http GET https://www.google.com
    

提交回复
热议问题