Closed silverwind closed 9 years ago
@silverwind It's slightly counterintuitive in this case, but it's an intended behaviour and it's documented here: https://github.com/jakubroztocil/httpie#output-options
--headers, -h
, --body, -b
, and --verbose, -v
are just aliases for --print=<arg>
. And when you repeat an argument (which you in fact do here because both --headers
and --verbose
are treated as --print=<arg>
), then the value specified last wins:
http --verbose --headers
(what you specify)http --print=hbHB --print=h
(what HTTPie sees)http --print=h
(how it interprets)Thanks for the detailed explanation. Still strikes me as odd that --verbose
actually makes it print less information (regardless of argument ordering).
--verbose --headers
doesn't print the request headers, while--headers --verbose
does. I think the ordering of arguments shouldn't matter in this case, and request headers should always be printed with --verbose.