Options for throttling requests #1906
Replies: 3 comments 3 replies
-
This can be implemented via an agent. |
Beta Was this translation helpful? Give feedback.
-
Not to doubt the validity of your answer, but it seems a bit steep. |
Beta Was this translation helpful? Give feedback.
-
It's not exactly the same as throttling, but I had to ensure a minimal delay between 2 requests, so I made this debouncing plugin: https://www.npmjs.com/package/got-plugin-debounce |
Beta Was this translation helpful? Give feedback.
-
What problem are you trying to solve?
I want to define a
got
instance where requests are throttled (i.e. 30 requests per minutes). Currently I can achieve this usingp-throttle
to wrap each simplegot
requests where they occur, and I haven't find a clean way to throttle paginate.Describe the feature
I think it would be nice if
got
had throttling options "à la"p-throttle
so that it is define at thegot
instance level.Maybe there is already a way to achieve this, but I failed at finding it through the docs, issues and discussions.
Checklist
Beta Was this translation helpful? Give feedback.
All reactions