6 ms·
htty, the HTTP TTY
I just published a first release of a new console app called htty. I like to think it’s something of a cross between curl and the Lynx browser.
Some bullet points:
* Intuitive commands and command aliases
* Support for familiar HTTP methods GET, POST, PUT, and DELETE, as well as HEAD, OPTIONS and TRACE
* Automatic URL-encoding of query-string parameters and URL fragments
* Transcripts, both verbose and summary
* Dead-simple cookie handling and redirect following
* Built-in help
Why do this when the admirable Node.js-based http-console exists? To begin with, not everybody is into Node yet, and so installing http-console is not as simple as 'gem install htty'. Furthermore, http-console's spare UI is not as full-featured as it might be.
I have some killer features in mind for the near future. Fork and contribute!
- njonsson 16y agoWhy do this when the admirable Node.js-based http-console exists? To begin with, not everybody is into Node yet, and so installing http-console is not as simple as 'gem install htty'. Furthermore, http-console's spare UI is not as full-featured as it might be. I have some killer features in mind for the near future. Fork and contribute!
- eddie_catflap 16y agoI really like this - can see some real troubleshooting benefits for it. Great work!
- pquerna 16y agostill worth a link to http-console though: http://github.com/cloudhead/http-console http://github.com/cloudhead/http-console (one of my favorite little tools of this year, need to spend some time to make it support oauth crap at some point)
- njonsson 16y agoYes, http-console really rocks. It was the inspiration for htty, as I indicate in the readme.
- mhansen 16y agoJust a bit of (unrelated) feedback: It's difficult to see the tty examples in small scaled images.
- tengkahwee 16y agoClicking on the images gives you the enlarged version.
- asjo 16y agoPNG-screenshots of a tty application - perfect.
- wavesplash 16y agoBrilliant. Any thoughts on Oauth2 and Facebook Graph support?
- pak 16y agoThis looks like the perfect companion for playing around with a REST API.. very cool. Certainly more fun than composing monstrous curl invocations.
- sz 16y agoThis + REST = CLI for the Web
- datapimp 16y agoThis is really good work. Any plans to support ncurse or something along those lines, so that I can arrow up through my command history?
- njonsson 16y agoSee other remarks in this thread. Yes, this is a planned feature.
- james2vegas 16y agoSo, basically http://search.cpan.org/dist/WWW-Mechanize-Shell http://search.cpan.org/dist/WWW-Mechanize-Shell then. Congratulations, your new wheel is round and shiny.
- mansilla 16y ago+1 on the Perl love.
- mhansen 16y agoDoesn't look like that supports other HTTP methods (a CTRL-F for 'delete' shows nothing).
- njonsson 16y agoYes, all these HTTP methods are supported: GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE. The command aliases are set up to reflect frequency of use. GET, POST, PUT, and DELETE can be invoked using those words as commands, but HEAD, OPTIONS, and TRACE must be specified as 'http-head', 'http-options', and 'http-trace', respectively.
- boundlessdreamz 16y agoSome of us may not want to install perl or figure out how to use cpan. If this project is not useful to you, then don't comment. Please don't comment just for being sarcastic
- kragen 16y agoThis is the most useful comment of all, because it summarizes the software in eleven words (although it left out "for Ruby".)
- steve19 16y agoThis app is crying out for readline support and command completion!
- kree10 16y agoI'd take the next logical step: integrate it with a shell, much like zsh's zftp module does for FTP sessions. I may have to write this now.
- parenthesis 16y agorlwrap http://utopia.knoware.nl/~hlub/uck/rlwrap/ http://utopia.knoware.nl/~hlub/uck/rlwrap/
- telemachos 16y agoThis is interesting, but I'm curious: what do people think are the advantages or disadvantages of using this instead of Ruby's own readline support? (My first thought: rlwrap already exists. Add one point. A disadvantage is that rlwrap makes the readline support depend on an external, third-party program which would need to be installed separately. Subtract one?)
- njonsson 16y agoI agree. Minimizing external dependencies (with a particular focus on the OS X experience) was a guiding principle of the project. I will probably use Ruby Readline (http://bogojoker.com/readline http://bogojoker.com/readline) to implement this. Another planned feature will likely require using Curses. It would be nice to reduce these two dependencies to one, but I'm not sure I'll start by reimplementing Ruby Readline in Curses.
- cloudhead 16y agoFantastic, I was hoping someone would implement the concept for all the ruby developers out there! I love the history feature too, I might have to steal it ;>
- njonsson 16y agoAbsolutely — return the favor!