Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chemzqm/one-query

Make the same get request made only once.
https://github.com/chemzqm/one-query

Last synced: about 1 month ago
JSON representation

Make the same get request made only once.

Awesome Lists containing this project

README

        

# 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)](http://component.io):

$ component install chemzqm/one-query

## API

### query(url, [params], callback)

The same as superagent.

## example

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

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

## License

MIT