Middleware to add a suffix to superagent request url
JavaScript
Latest commit 14dfe0c Feb 11, 2016 @timneutkens Initial commit
Permalink
Failed to load latest commit information.
README.md Initial commit Feb 11, 2016
index.js Initial commit Feb 11, 2016
package.json Initial commit Feb 11, 2016

README.md

Superagent Suffix Middleware

Middleware to add a suffix to superagent request url

Installation

npm install --save superagent-suffix

Example

var request = require('superagent');
// For example purposes
var prefix = require('superagent-prefix');
var suffix = require('superagent-suffix');
request
  .get('/products')
  .use(prefix('https://www.example.com/'))
  .use(suffix('.json'))
  .end(function(err, res) {
    // Result from https://www.example.com/products.json
    console.log(res);
  });