appagent
v0.1.0
Published
Send requests to local HTTP servers (http.Server, express, connect or a function) with superagent
Downloads
9
Readme
appagent
Send requests to local HTTP servers (http.Server, express, connect or a function) with superagent.
Inspired by supertest's
request(app).method()
API.
Install
$ npm install appagent
Usage
var appagent = require('appagent')
, app = require('express')();
// Without installing
var request = appagent(app);
request.get('/', function(err, res) { ... });
request.post('/').end(function(err, res) { ... });
// Install as a `request` property of an app
request.install(app);
app.request.put('/', ...);
// Or install globally on http.Server prototype
request.install();
License
MIT