Show / Hide Table of Contents

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
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
HttpRequestMessage request

The HTTP request message.

CancellationToken cancellationToken

Cancellation token to cancel the operation.

Returns
Type Description
Task

Extension Methods

HttpExtenstions.ToDelegatingHandler(IHttpExecuteInterceptor)
HttpExtenstions.ToDelegatingHandler(IHttpExecuteInterceptor, HttpMessageHandler)
Utilities.ThrowIfNull<T>(T, string)
In this article
Back to top Generated by DocFX