Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Dec 9, 2013
1 parent 3a0592c commit 329ebf7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,26 @@ config.MessageHandlers.Add(new ThrottlingHandler()
});
```

###Stack rejected requests

By default, rejected calls are not added to the throttle counter. If a client makes 3 requests per second,
and you've set one call per second limit, the minute, hour and day counters will record only one call, the one that got throw.
If you want to record all requests including the rejected ones, you'll have to set <code>StackBlockedRequests</code> to true.

``` cs
config.MessageHandlers.Add(new ThrottlingHandler()
{
Policy = new ThrottlePolicy(perSecond: 1, perMinute: 30)
{
IpThrottling = true,
ClientThrottling = true,
EndpointThrottling = true,
StackBlockedRequests = true
},
Repository = new CacheRepository()
});
```

###Retrieving API Client Key

By default, the ThrottlingHandler retrieves the client API key from the "Authorization-Token" request header value,
Expand Down

0 comments on commit 329ebf7

Please sign in to comment.