Show / Hide Table of Contents

Interface IHttpExecuteInterceptor

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

Namespace: Google.Apis.Http
Assembly: Google.Apis.Core.dll
Syntax
public interface IHttpExecuteInterceptor

Methods

InterceptAsync(HttpRequestMessage, CancellationToken)

Invoked before the request is being sent.
Declaration
Task InterceptAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Net.Http.HttpRequestMessage request

The HTTP request message.

System.Threading.CancellationToken cancellationToken

Cancellation token to cancel the operation.

Returns
Type Description
System.Threading.Tasks.Task

Extension Methods

Utilities.ThrowIfNull<T>(T, String)
In This Article
Back to top