Hacker News new | past | comments | ask | show | jobs | submit login
Interactive command line HTTP inspector written in Go (github.com/asciimoo)
279 points by tartpac on Feb 4, 2017 | hide | past | favorite | 32 comments



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".


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!


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


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



You found the library. Looks like simple math stuff. Neat.


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.


I made another tool similar to this, but instead of being based on curl, it's based on httpie: http://http-prompt.com


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.


I could see this being incredibly useful, especially on remote servers where I can't use something like Postman.


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?


>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...


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..."


It's because this is Hacker News. How something was made is at least as important for hackers as what was made.


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.


Zeds attack proxy is very similar to this. https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Proje...


In the same spirit here is an interactive ssh tool for connecting to EC2: https://github.com/soheil/ssh2


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 :)


I thought I recognised the name - repo owner is also behind the 'searx' meta search engine.


Actually, I wrote this tool to make searx's engine development easier. It is glad to see, that so many people find it useful. =)


Thank you for both! :)


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.


If this had an 'export as curl command' command, that'd be awesome.


That's one of my favorite features of the Firefox developer console.


This looks very well done. Strong tty UI is hard to find these days.


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?


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.


In case anyone is wondering, press TAB to move forward and "SHIFT + TAB" to move backwards.


Looks great! Thanks for sharing it!

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


Looks nice and useful. Time saver over repetitive curl commands.


You might like -- https://mitmproxy.org or Burp proxy. These are the daily drivers of most infosec pros I know.


This is impressive. Showing a video of your app running really showcases it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: