- npm-installable cli http client
- thin wrapper around mikeal/request
- named by @blakmatrix
npm install bbgurl -g
$ bbgurl
bbgurl: A tiny cli http client; a thin wrapper around mikeal/request. Named by @blakmatrix.
USAGE: node ./bbgurl.js <url> [<options>]
Options:
--body, -d String body for http request.
--followRedirect Follow the first http 30x redirect (if any). [boolean] [default: true]
--followAllRedirects Follow *all* http 30x redirects (if any). [boolean] [default: false]
--headers, -H A JSON representation of any headers. [default: {}]
--include, -i Print the request headers. [boolean] [default: false]
--logfile Optional file to write logs to.
--method, -X HTTP method. [default: "GET"]
--output, -o HTTP response output file (stdout if not specified)
--pretty, -p Attempt to reformat JSON chunks in a human-readable format [boolean] [default: false]
--strictSSL Require that SSL certificates be valid. [boolean] [default: false]
--user, -u Specify basic auth credentials (ex: `-u user:pass`)
--verbose, -v Output logs to stderr. [boolean]
Argument check failed: Must specify a uri.
$ bbgurl http://whatismyip.nodejitsu.com/index.json
{ "ip": "71.198.76.200" }
$ bbgurl http://whatismyip.jit.su -H '{ "accept": "application/json" }'
{ "ip": "71.198.76.200" }
$ bbgurl -u josh:supersekritpw http://localhost:8080
{ "success": true, "message": "Welcome to the inner sanctum." }
$ bbgurl --verbose http://nodejs.org/dist/v0.8.4/node-v0.8.4.tar.gz -o node-v0.8.4.tar.gz
[bbgurl] Downloading: (♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥) 100% (11.29MB/11.29MB)
[bbgurl] Data written to /home/josh/dev/bbgurl/node-v0.8.4.tar.gz
$ tar -xzf node-v0.8.4.tar.gz
$ cd node-v0.8.4/
$ ls
AUTHORS BSDmakefile common.gypi deps lib Makefile README.md test vcbuild.bat
benchmark ChangeLog configure doc LICENSE node.gyp src tools
MIT/X11.