chemzqm / one-query

Make the same get request made only once.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

one-query

Make the same get request made only once.

The default timeout is 10s.

If any error happens, the following request with the same url & parmas will be sent again.

Installation

Install with component(1):

$ component install chemzqm/one-query

API

query(url, [params], callback)

The same as superagent.

example

var query = require('one-query');

query('/test', {x:1, y:2}, function(err, res) {
  console.log(res.status);
});

License

MIT

About

Make the same get request made only once.


Languages

Language:JavaScript 100.0%