Table of Contents

Class Http2Handler

Namespace
Arc4u.OAuth2
Assembly
Arc4u.OAuth2.dll

Force the Http request to use Http 2.0

public class Http2Handler : DelegatingHandler, IDisposable
Inheritance
Http2Handler
Implements
Inherited Members

Constructors

Http2Handler()

Initializes a new instance of the Http2Handler class with a default HttpClientHandler as inner handler.

public Http2Handler()

Http2Handler(DelegatingHandler)

Initializes a new instance of the Http2Handler class.

public Http2Handler(DelegatingHandler handler)

Parameters

handler DelegatingHandler

The inner handler.

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.

OperationCanceledException

The cancellation token was canceled. This exception is stored into the returned task.