-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
Display http headers #290
Comments
|
Hi, Thank you for your quick response ! There may have been a misunderstanding because the command you proposed returns a json array of headers, which is not what I had in mind I was wondering if the current fx viewport could contain :
Something like the following :
|
I see. I nice idea but I'm not sure how to be able to detect those kinds of headers. It should be integrated into our json parser which will be tricky. |
I'm not aware of the component you use for the presentation layer, nor of the global architecture of fx, but maybe it means that the viewport has to be composed of two different parts, one dedicated to json with its attached parser (jq ?) and an optional one for headers ? |
Problem is not with displaying the headers. Problem is with parsing them. How to distinguish them from JSON? Or invalid JSON? |
Wouldn't a regular expression help to determine that the given data is the combination of http headers and a body separated by a null line, like it's stipulated in rfc1945 section-4.1 ? |
I guess we can add a custom parser which checks if a first line is from curl, and starts parsing headers.
Would you like to try to implement such a feature? Note parser should be implemented in both Go parser and JS parser: Line 20 in 1952074
Line 272 in 1952074
|
Hi ! I have no notion of Go whatsoever unfortunately |
Hi,
Thanks for fx ! It's a great tool to explore json without leaving the terminal.
I guess this is a bit out of scope (and possibly complicated to achieve) but I think it would be great to be able to pipe the result of a curl request with the
-i
flag to fx and have the headers displayed at the top of the viewport.Thanks for your time !
The text was updated successfully, but these errors were encountered: