0.2.5 • Published 5 years ago

@cluelesscoders/request-pool v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Request Pool

Creates a pool of request.

Features

  • Axios based request pool
  • Support for all axios request types.

Example

import { RequestPool } from '@cluelesscoders/request-pool';

const targets = [
    { url: 'http://testurl1/', method: 'GET' },
    { url: 'http://testurl2/', method: 'GET' },
    { url: 'http://testurl3/', method: 'POST', data: { test: 'data' } },
];

// limit two request at a time
const poolSize = 2;

const reqPool = new RequestPool(targets, poolSize);

// Get all responses including the failures
const responses = await reqPool.start();
0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago