Skip to content
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

Any option to show 103 Early Hints responses? #385

Open
moon-musick opened this issue Oct 18, 2024 · 2 comments
Open

Any option to show 103 Early Hints responses? #385

moon-musick opened this issue Oct 18, 2024 · 2 comments

Comments

@moon-musick
Copy link

Is there any option to show an 103 Early Hints response?

It seems HTTPie stops at a 103 response and does not go further. I admit I haven't check the 3.2.3 version, still using 3.2.2, but release notes don't suggest any other behavior implemented in 3.2.3.

I found xh and it looks very promising, with its native HTTP 2 support and performance gains over HTTPie, and it's great it doesn't stop at a 103 response.

Is there an option to show the 103 being returned by the server? I tried various combinations of --verbose, --all, --follow, and --print options, to no avail.

My rationale is, I have been using HTTPie for a long time as a diagnostic tool, as I work as a sysadmin at a mid-size regional news site. Quickly checking whether some endpoint is working, if there are specific headers being set etc. is an important part of my job. I can often answer a question from an exec or a developer in mere seconds by issuing a specific HTTP request and sending them a readable screenshot as a proof helps a lot. It doesn't work like that with 103 Early Hints. I can check these with curl --verbose, but the messy output even after cleanup doesn't resemble pretty and readable HTTPie / xh output.

@blyxxyz
Copy link
Collaborator

blyxxyz commented Oct 18, 2024

We don't have an option for this right now. The library we use unfortunately doesn't support it: hyperium/hyper#2565

Or rather, it only supports it as an unstable unsafe FFI API. The internal plumbing is there so adding it as a stable Rust feature might not be too much work. (Unless this plumbing only exists for HTTP/1 and not HTTP/2?)

On the xh side I think it would make sense to add it as another letter you can pass to --print. Not sure whether it should be enabled by default with --verbose.

Apparently HTTPie's behavior is a known issue that's also caused by library limitations: psf/requests#5190

@moon-musick
Copy link
Author

Thanks for checking this out. I suppose you'd need to wait for hyper to implement it as a stable feature? I can't help with that unfortunately, I know some Rust, but most definitely not enough yet.

As for the xh CLI interface, I certainly don't mind having it hidden behind an additional option, as long as it's there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants