webshell: A console-based JavaScripty web client utility (using node.js)

If you’re like me, you probably spend a good deal of time using cURL from the console or Hurl on the web to test/inspect/debug HTTP stuffs. Wanting something a bit more robust and console-friendly Evan Haas and Sean Coates have created Webshell.

Webshell is built on Node.js (of which we’re big fans), and gives you a simple console to load and debug HTTP calls, follow 302 redirects, store history, process JSON, and more:

To run, clone the project and then fire up the shell with Node:

node shell.js 

Then you’re all set to start making HTTP requests:

webshell> GET
HTTP 301
webshell> $_.headers
{ location: ''
, 'content-type': 'text/html; charset=UTF-8'
, date: 'Sun, 08 Aug 2010 22:38:23 GMT'
, expires: 'Tue, 07 Sep 2010 22:38:23 GMT'
, 'cache-control': 'public, max-age=2592000'
, server: 'gws'
, 'content-length': '219'
, 'x-xss-protection': '1; mode=block'
, connection: 'close'
webshell> $_.headers.location
webshell> $_.follow()
HTTP 302
webshell> $_.headers.location
webshell> $_.follow()
HTTP 200
webshell> $_.raw.substring(0, 50)
'<!doctype html><html><head><meta http-equiv="conte'
webshell> ^D

The built-in JSON processing is slick:

webshell> GET
HTTP 200
webshell> $
'Sean Coates'
webshell> ^D

[Source on GitHub]


Sign in or join to comment

0:00 / 0:00