News for hackers. Stuff that matters.
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 chrisper on Saturday February 04, 2017 @08:14PM (#13570162)
Does anyone know how they did the user interface? I mean I could read the source code, but I am asking for a TL;DR if someone has that.

EDIT: Actually it seems to be a library: https://github.com/jroimartin/gocui but the question still stands!

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.

[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

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.

https://en.m.wikipedia.org/wiki/Impulse_Tracker

Re:Interactive command line HTTP inspector written in Go by PerryCox on Sunday February 05, 2017 @12:43PM (#13573460)
Re:Interactive command line HTTP inspector written in Go by eddieroger on Saturday February 04, 2017 @08:50PM (#13570319)
You found the library. Looks like simple math stuff. Neat.
Re:Interactive command line HTTP inspector written in Go by gigatexal on Saturday February 04, 2017 @08:41PM (#13570274)
This is really cool. I'd upvote more if I could.

And it would have come in really handy for studying for the google cloud support role I didn't get. Fault all my own.

Re:Interactive command line HTTP inspector written in Go by eliangcs on Saturday February 04, 2017 @09:37PM (#13570491)
I made another tool similar to this, but instead of being based on curl, it's based on httpie: http://http-prompt.com
Re:Interactive command line HTTP inspector written in Go by catern on Saturday February 04, 2017 @08:51PM (#13570324)
This is similar to restclient.el for Emacs. https://github.com/pashky/restclient.el

wuzz seems to be focused on one request at a time, though.

Re:Interactive command line HTTP inspector written in Go by gizmo385 on Saturday February 04, 2017 @07:23PM (#13569978)
I could see this being incredibly useful, especially on remote servers where I can't use something like Postman.
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.

[1] 50+ pages of results: https://hn.algolia.com/?query=written%20in&sort=byPopularity...

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 fauigerzigerk on Sunday February 05, 2017 @05:09AM (#13571695)
It's because this is Hacker News. How something was made is at least as important for hackers as what was made.
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 brian_herman on Saturday February 04, 2017 @09:16PM (#13570425)
Zeds attack proxy is very similar to this. https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Proje...
Re:Interactive command line HTTP inspector written in Go by soheil on Saturday February 04, 2017 @08:22PM (#13570192)
In the same spirit here is an interactive ssh tool for connecting to EC2: https://github.com/soheil/ssh2
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 OJFord on Sunday February 05, 2017 @08:23AM (#13572297)
I thought I recognised the name - repo owner is also behind the 'searx' meta search engine.
Re:Interactive command line HTTP inspector written in Go by asciimoo on Sunday February 05, 2017 @02:44PM (#13574141)
Actually, I wrote this tool to make searx's engine development easier. It is glad to see, that so many people find it useful. =)
Re:Interactive command line HTTP inspector written in Go by OJFord on Sunday February 05, 2017 @05:43PM (#13575148)
Thank you for both! :)
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 OJFord on Sunday February 05, 2017 @05:23AM (#13571726)
If this had an 'export as curl command' command, that'd be awesome.
Re:Interactive command line HTTP inspector written in Go by supergreg on Sunday February 05, 2017 @07:53AM (#13572201)
That's one of my favorite features of the Firefox developer console.
Re:Interactive command line HTTP inspector written in Go by tyingq on Saturday February 04, 2017 @07:45PM (#13570065)
This looks very well done. Strong tty UI is hard to find these days.
Re:Interactive command line HTTP inspector written in Go by kevdougful on Saturday February 04, 2017 @10:59PM (#13570787)
This is cool. I will definitely try this out. I have one question though: what does this give me that Postman and/or cURL does not?
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.

Re:Interactive command line HTTP inspector written in Go by malikNF on Saturday February 04, 2017 @10:06PM (#13570589)
In case anyone is wondering, press TAB to move forward and "SHIFT + TAB" to move backwards.
Re:Interactive command line HTTP inspector written in Go by andmarios on Sunday February 05, 2017 @02:24PM (#13574037)
Looks great! Thanks for sharing it!

Now, if only it would also support websockets. :p

Re:Interactive command line HTTP inspector written in Go by nodesocket on Saturday February 04, 2017 @07:36PM (#13570036)
Looks nice and useful. Time saver over repetitive curl commands.
Re:Interactive command line HTTP inspector written in Go by bitexploder on Saturday February 04, 2017 @07:59PM (#13570119)
You might like -- https://mitmproxy.org or Burp proxy. These are the daily drivers of most infosec pros I know.
Re:Interactive command line HTTP inspector written in Go by bitmapbrother on Saturday February 04, 2017 @10:23PM (#13570648)
This is impressive. Showing a video of your app running really showcases it.