Batch Request middleware for koa. Turn one request into many!
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.jshintrc
.travis.yml
Gruntfile.js
LICENSE
README.md
package.json
social-radar-black-orange.png

README.md

Batch Request middleware for koa

Turn one request into many with Koa Batch!

Looking for the ExpressJS version of this module?

A simple library for batching HTTP requests

View Documentation

Build Status Built with Grunt

QuickStart

Download via NPM

NPM

then in your app (example using koa-router)

var batch = require('koa-batch').batch();

// Use Batch Request as middleware on an endpoint you want to service batch requests
app.post('/batch', batch);

Optionally use our included middleware to check the validity of your batch request

var batch = require('koa-batch').batch(),
    validate = require('koa-batch').validate();

// Include the validate middleware before batch middleware
app.post('/batch', validate, batch);

And that's it!

Proudly written in Washington, D.C. by:

SocialRadar