Interface IHttpExecuteInterceptor (1.55.0)

public interface IHttpExecuteInterceptor

HTTP request execute interceptor to intercept a HttpRequestMessage before it has been sent. Sample usage is attaching "Authorization" header to a request.

Namespace

Google.Apis.Http

Assembly

Google.Apis.Core.dll

Methods

InterceptAsync(HttpRequestMessage, CancellationToken)

Task InterceptAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Invoked before the request is being sent.
Parameters
NameDescription
requestHttpRequestMessage

The HTTP request message.

cancellationTokenCancellationToken

Cancellation token to cancel the operation.

Returns
TypeDescription
Task

Extension Method