• Home
  • My Account
  • Docs
  • Catalog Browser
  • API Status
Show / Hide Table of Contents

Delegate InterceptRequestDelegate

A delegate for the asynchronous interception of a HttpRequestMessage and the return of a HttpResponseMessage using a SendRequestDelegate.

Namespace: WhenFresh.Api.Client.Http
Assembly: WhenFresh.Api.Client.dll
Syntax
public delegate Task<HttpResponseMessage> InterceptRequestDelegate(SendRequestDelegate send, HttpRequestMessage request, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SendRequestDelegate send
HttpRequestMessage request
CancellationToken cancellationToken
Returns
Type Description
Task<HttpResponseMessage>

Constructors

InterceptRequestDelegate(object, IntPtr)

A delegate for the asynchronous interception of a HttpRequestMessage and the return of a HttpResponseMessage using a SendRequestDelegate.

Declaration
public InterceptRequestDelegate(object @object, IntPtr method)
Parameters
Type Name Description
object object
IntPtr method

Methods

BeginInvoke(SendRequestDelegate, HttpRequestMessage, CancellationToken, AsyncCallback, object)

A delegate for the asynchronous interception of a HttpRequestMessage and the return of a HttpResponseMessage using a SendRequestDelegate.

Declaration
public virtual IAsyncResult BeginInvoke(SendRequestDelegate send, HttpRequestMessage request, CancellationToken cancellationToken, AsyncCallback callback, object @object)
Parameters
Type Name Description
SendRequestDelegate send
HttpRequestMessage request
CancellationToken cancellationToken
AsyncCallback callback
object object
Returns
Type Description
IAsyncResult

EndInvoke(IAsyncResult)

A delegate for the asynchronous interception of a HttpRequestMessage and the return of a HttpResponseMessage using a SendRequestDelegate.

Declaration
public virtual Task<HttpResponseMessage> EndInvoke(IAsyncResult result)
Parameters
Type Name Description
IAsyncResult result
Returns
Type Description
Task<HttpResponseMessage>

Invoke(SendRequestDelegate, HttpRequestMessage, CancellationToken)

A delegate for the asynchronous interception of a HttpRequestMessage and the return of a HttpResponseMessage using a SendRequestDelegate.

Declaration
public virtual Task<HttpResponseMessage> Invoke(SendRequestDelegate send, HttpRequestMessage request, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SendRequestDelegate send
HttpRequestMessage request
CancellationToken cancellationToken
Returns
Type Description
Task<HttpResponseMessage>