New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make http -f
display the request headers. Closes #9912
#10022
Conversation
Nice! Thanks for adding this. What about req_headers and res_headers? Also, is it possible to add some tests to ensure we don't break this functionality in the future? |
As a developer I'd prefer uniform names, but as a user I feel like simple
I wanted to add tests, but couldn't find existing tests for the http module as an example. The problem is that this feature make sense at the very end of the request/response process, so it sounds like a case for integration testing, and I'm absolutely no Rust expert to bring the complete web integration testing solution. I'll try to craft some unit tests though. |
there are tests for each http command. i looked at them this morning. maybe you could make |
That could be an option, I'll check how it feels |
Not bad, |
The test is added |
Updated the PR description and screenshot according to the current format |
Looks great! |
Thanks for putting this together. I tested a few things and it seems to work great! |
Description
As described in #9912, the
http
command could display the request headers with the--full
flag, which could help in debugging the requests. This PR adds such functionality.User-Facing Changes
If
http get
or otherhttp
command which supports the--full
flag is invoked with the flag, it used to display theheaders
key which contained an table of response headers. Now this key contains two nested keys:response
andrequest
, each of them being a table of the response and request headers accordingly.