1.0.5 • Published 4 years ago
batch-consuming v1.0.5
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!