Skip to content

RateLimitOptions

Class public
Configuration options for API rate limiting.
Namespace SampleApi
Assembly SampleApi
Package v1.0.0.0
public class RateLimitOptions
Bind an instance of RateLimitOptions from the application's configuration section (e.g., "RateLimiting") to control how many requests a client may make within a sliding time window.
int RateLimitOptions.MaxRequests

Gets or sets the maximum number of requests allowed within the time window.

int RateLimitOptions.RetryAfterSeconds

Gets or sets the number of seconds a client should wait before retrying after being rate-limited.

int RateLimitOptions.WindowSeconds

Gets or sets the duration of the sliding window in seconds.