appagent

Send requests to local HTTP servers (http.Server, express, connect or a function) with superagent

Send requests to local HTTP servers (http.Server, express, connect or a function) with superagent.

Inspired by supertest's request(app).method() API.

$ npm install appagent
var appagent = require('appagent')
  , app = require('express')();
 
// Without installing 
var request = appagent(app);
request.get('/', function(errres) { ... });
request.post('/').end(function(errres) { ... });
 
// Install as a `request` property of an app 
request.install(app);
app.request.put('/', ...);
 
// Or install globally on http.Server prototype 
request.install();

MIT