RateLimit support in PnP.Core? #1026
-
Will we see support for RateLimit headers in PnP.Core? We have already full support for Retry-After, so it would make sense to have a cool-down build into requests if RateLimit-Remaining drops below a certain percentage? For context see Berts samples here There is a Ratelimits branch but it looks abandoned |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@AndersRask : RateLimit support is integrated in PnP Core SDK (https://github.com/pnp/pnpcore/blob/dev/src/sdk/PnP.Core/Services/Core/Http/RateLimiter.cs), but it's off by default. You can turn it on via the |
Beta Was this translation helpful? Give feedback.
@AndersRask : RateLimit support is integrated in PnP Core SDK (https://github.com/pnp/pnpcore/blob/dev/src/sdk/PnP.Core/Services/Core/Http/RateLimiter.cs), but it's off by default. You can turn it on via the
RateLimiterMinimumCapacityLeft
configuration option (see https://pnp.github.io/pnpcore/using-the-sdk/basics-settings.html). I still need to beter document this feature, you can use the built-in functionality via the configuration option, but you can also opt to receive an event and handle the headers in your application. The Microsoft 365 Assessment tool uses that model as it combines PnP Core SDK with the CSOM libraries. See https://github.com/pnp/pnpassessment/blob/main/src/PnP.Scan…