Interface IHttpExecuteInterceptor (1.60.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

GoogleApisHttp

Assembly

Google.Apis.Core.dll

Methods

InterceptAsync(HttpRequestMessage, CancellationToken)

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

The HTTP request message.

cancellationToken CancellationToken

Cancellation token to cancel the operation.

Returns
Type Description
Task

Extension Method