Search code examples
httpie

How to print response headers to console and save content to file?


How can I print the response headers to console and save the response content to a file?


I tried

http GET http://download.sysinternals.com/files/SysinternalsSuite.zip --output sis.zip

But this printed both the headers and content to the file, making it nonsense.


Solution

  • It's not possible. Reported issue https://github.com/jkbr/httpie/issues/97

    Update 2013: Fixed. Try

    http -h --download http://download.sysinternals.com/files/SysinternalsSuite.zip