Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An HTTP client library for node that just does what you expect.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Makefile
Octocat-spinner-32 hottap.js
Octocat-spinner-32 package.json

hottap is an HTTP client library for node that just does what you expect.

Build Status

hottap is a node.js library for doing http requests that is simpler (IMO) than the standard library, without trying to do much else. I think it's a 'just-enough abstraction' over http to avoid leakiness and is probably useful for 90% of the common use-cases.

It has no dependencies other than the node standard library.

Example Usage:

Simple GET:

var hottap = require('hottap').hottap;
hottap("").request("GET", function(err, response){

Simple POST:

var hottap = require('hottap').hottap;
           {"Content-Type" : "application/json"}, 
           function(err, response){

About the response object:

response.status  // status code as a Number
response.body    // http body as a string
response.headers // headers as an object/hash

About the Url object

var url = hottap("");
url.port = 80
url.protocol = "http"
url.path = "/some/path"
url.hostname = ""
url.hash = "testhash"
url.querystring.some_var =  "some_value"
url.auth = 'login:password'

Invalid Urls will throw exceptions!

Running the Tests:

Running tests requires a few dependencies (listed in package.json). To install them, simply type:

npm install

To run the tests, at the project root, simply type:


JSON convenience method:

var hottap = require('hottap').hottap;
hottap("").json("POST", {}, {"subject":"blah"}, function(err, response){
    console.log(response.body.subject);  // "blah"
Something went wrong with that request. Please try again.