batch-consuming
v1.0.5
Published
This package allows you to consume any end-point rest service
Downloads
5
Readme
batch-consuming
batch-consuming allows you to do multiples request by batch to determined end points in three simple steps.
Set an url and configure your headers
const url = `your end point url` let headers = { Authorization: `${configuration.authType} ${configuration.token}`, ContentType: 'application/json' }
Create a new instance of
BatchConsuming
const connect = new BatchConsuming(url, headers);
Call the method
executeAsync
and pass both the batch size and the payload arrayconst result = await connect.executeAsync(30, payload)
That's it!