Table of Contents

Class RateLimitingHandler

Namespace
Autodesk.Common.HttpClientLibrary
Assembly
Autodesk.Common.HttpClientLibrary.dll
public class RateLimitingHandler : DelegatingHandler, IDisposable
Inheritance
RateLimitingHandler
Implements
Inherited Members

Constructors

RateLimitingHandler(HttpMessageHandler, int, TimeSpan?)

public RateLimitingHandler(HttpMessageHandler innerHandler, int maxRequests, TimeSpan? timeWindow = null)

Parameters

innerHandler HttpMessageHandler
maxRequests int
timeWindow TimeSpan?

Methods

SendAsync(HttpRequestMessage, CancellationToken)

Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.

protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)

Parameters

request HttpRequestMessage

The HTTP request message to send to the server.

cancellationToken CancellationToken

A cancellation token to cancel operation.

Returns

Task<HttpResponseMessage>

The task object representing the asynchronous operation.

Exceptions

ArgumentNullException

The request was null.