Last active
August 29, 2015 14:19
-
-
Save NineMvp/dc0c3c50e373ea04be54 to your computer and use it in GitHub Desktop.
ThrottlingHandler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var throttlingHandler = new ThrottlingHandler( | |
new InMemoryThrottleStore(), | |
quota => 10, | |
TimeSpan.FromMinutes(1), | |
"Exceed the limit 10 requests per minute!"); | |
config.MessageHandlers.Add(throttlingHandler); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment