Re:Interactive command line HTTP inspector written in Go
by gschier on Sunday February 05, 2017 @03:37AM
(#13571493)
That's awesome! The animated GIF on the README does a great job showcasing it. I've been working on a more complex GUI API testing tool (https://insomnia.rest) but, to be honest, nothing beats a simple command line tool like this for "quick tests".
Re:Interactive command line HTTP inspector written in Go
by robert_tweed on Saturday February 04, 2017 @09:16PM
(#13570427)
If you mean the general principle of this kind of pseudo-GUI in text mode, look into codepage 437 [1]. It's possible to do more advanced stuff with custom glyphs [3], but it doesn't look like this does anything like that - it generally requires direct hardware access to modify the font.
This was a pretty common technique in 90s DOS programs, but it can be tricky to get working cross platform over a serial terminal. The library you found seems to rely on termbox [2] for that.
Re:Interactive command line HTTP inspector written in Go
by nitrogen on Sunday February 05, 2017 @03:03PM
(#13574251)
For UNIX-style terminals, there are also VT-nnn (can't remember the nnn) line drawing commands, and Unicode line drawing characters.
My favorite DOS app that modified the VGA font was Impulse Tracker. It could actually draw oscilloscopes in text mode, and its source code is available.
Re:Interactive command line HTTP inspector written in Go
by xiaoma on Sunday February 05, 2017 @04:53AM
(#13571655)
What is it with adding "written in Go" to titles like this? Was the title editorialized to get upvotes from the Go fans? Is "written in X" added to project titles in general and somehow I just haven't noticed it?
Re:Interactive command line HTTP inspector written in Go
by jasode on Sunday February 05, 2017 @07:26AM
(#13572108)
>Is "written in X" added to project titles in general and somehow I just haven't noticed it?
The "written in X" is a very popular[1] type of post for the HN audience because it usually points to source code like github/sourceforge. Your annoyance about it is puzzling and out of place. It's as if a commenter complains on a photography forum about a post titled "Paris Eiffel Tower taken with Canon 35mm lens"; the "Canon 35mm lens" is part of what makes the post interesting to potential readers of that particular community.
Re:Interactive command line HTTP inspector written in Go
by OJFord on Sunday February 05, 2017 @05:20AM
(#13571719)
No, it's not just Go - Rust in particular as well at the moment, but also others.
As sibling comment says, it's another angle for HN readers to be interested in. Someone might read it and think "meh, I like postman, I'm fine with that - oh but hey, Go, that's interesting - I like Go, I wonder how they..."
Re:Interactive command line HTTP inspector written in Go
by gribbly on Sunday February 05, 2017 @12:38PM
(#13573425)
It's pretty much the standard here, 'x' written in Go, Rust, Elixir, C#, Swift, etc
I can't understand how you are just noticing it now ?
Anyway I don't see a problem with it, like someone else mentioned, I might not be interested in yet another implementation of 'x' and would just scroll past it, however if it's implemented in a language I'm interested in then I might want to check out the code.
Re:Interactive command line HTTP inspector written in Go
by tejasmanohar on Saturday February 04, 2017 @08:15PM
(#13570167)
Nicely done! I've become a big fan of interactive command-line programs. I hate modifying cURL commands inline when I really want something REPL-like :)
Re:Interactive command line HTTP inspector written in Go
by jvehent on Sunday February 05, 2017 @05:06AM
(#13571687)
These HTTP clients are all very cool, and probably fun pet projects, but they shouldn't stop devs from learning as much cUrl as they can. It's the Swiss army knife of web services.
Re:Interactive command line HTTP inspector written in Go
by andrewstuart2 on Saturday February 04, 2017 @11:14PM
(#13570817)
State and easier navigation/alteration. The most painful part of curl commands (for exploring) is editing the command when you want to change a parameter, header, etc.
I like this interface personally because it separates the path to its own area, then headers and query parameters are separate areas with each instance on its own line.
It makes it quite easy to explore a rest interface and tweak your queries ad hoc.
EDIT: Actually it seems to be a library: https://github.com/jroimartin/gocui but the question still stands!
This was a pretty common technique in 90s DOS programs, but it can be tricky to get working cross platform over a serial terminal. The library you found seems to rely on termbox [2] for that.
[1] https://en.m.wikipedia.org/wiki/Code_page_437
[2] https://github.com/nsf/termbox-go
(edit)
[3] I thought Norton Commander did this, but I was mistaken - it just uses codepage 437. It was Norton Utilities [4].
[4] https://en.m.wikipedia.org/wiki/VGA-compatible_text_mode
My favorite DOS app that modified the VGA font was Impulse Tracker. It could actually draw oscilloscopes in text mode, and its source code is available.
https://en.m.wikipedia.org/wiki/Impulse_Tracker
[1]: https://en.wikipedia.org/wiki/Code_page_437
[4]: https://en.wikipedia.org/wiki/VGA-compatible_text_mode
And it would have come in really handy for studying for the google cloud support role I didn't get. Fault all my own.
wuzz seems to be focused on one request at a time, though.
The "written in X" is a very popular[1] type of post for the HN audience because it usually points to source code like github/sourceforge. Your annoyance about it is puzzling and out of place. It's as if a commenter complains on a photography forum about a post titled "Paris Eiffel Tower taken with Canon 35mm lens"; the "Canon 35mm lens" is part of what makes the post interesting to potential readers of that particular community.
[1] 50+ pages of results: https://hn.algolia.com/?query=written%20in&sort=byPopularity...
As sibling comment says, it's another angle for HN readers to be interested in. Someone might read it and think "meh, I like postman, I'm fine with that - oh but hey, Go, that's interesting - I like Go, I wonder how they..."
I can't understand how you are just noticing it now ?
Anyway I don't see a problem with it, like someone else mentioned, I might not be interested in yet another implementation of 'x' and would just scroll past it, however if it's implemented in a language I'm interested in then I might want to check out the code.
I like this interface personally because it separates the path to its own area, then headers and query parameters are separate areas with each instance on its own line.
It makes it quite easy to explore a rest interface and tweak your queries ad hoc.
Now, if only it would also support websockets. :p