aacerox / node-rest-client

REST API client from node.js
MIT License
376 stars 132 forks source link

Support for retry #187

Open muditdixit7 opened 6 years ago

muditdixit7 commented 6 years ago

Need support for request retry

zxxc commented 5 years ago

Vote for this. Would like to have possibility or workarounds at least to retry all rate limit 429 responses, for example after 1 second, 2,4,8,...,64 seconds

We are using node-rest-client widely in our project. And if i'm trying to decorate get,post methods with polly-js it looks ugly and doeesn't really work. Especially with .on('error') methods

Is it possible to retry requests? Does anyone knows any workaround to do this without rework all parts that are using node-rest-client?