I've got a single function that executes an HTTP request. I use this function all throughout a simple program I've written. I need to throttle these HTTP requests though so that I do not exceed rate limits. In the JavaScript world, there's a really handy third party library that provides a throttle
function that returns a new function that calls your own function but will queue up the calls so that they only occur X times per minute or whatever.
Is there a built in C# way of doing this, or a handy pattern or nuget pkg for this?
The C do while statement creates a structured loop that executes as long as a specified condition is true at the end of each pass through the loop.
The do-while statement lets you repeat a statement or compound statement until a specified expression becomes false.
The ' |= ' symbol is the bitwise OR assignment operator.
If you use Reactive Extensions, you can take advantage of the Observable.Throttle()
method: https://msdn.microsoft.com/en-us/library/hh229400(v=vs.103).aspx
The Reactive Extensions page can be found at http://reactivex.io/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With