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

Delegate SendRequestDelegate

A delegate for the asynchronous sending of a HttpRequestMessage and the return of a HttpResponseMessage.

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

Constructors

SendRequestDelegate(object, IntPtr)

A delegate for the asynchronous sending of a HttpRequestMessage and the return of a HttpResponseMessage.

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

Methods

BeginInvoke(HttpRequestMessage, CancellationToken, AsyncCallback, object)

A delegate for the asynchronous sending of a HttpRequestMessage and the return of a HttpResponseMessage.

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

EndInvoke(IAsyncResult)

A delegate for the asynchronous sending of a HttpRequestMessage and the return of a HttpResponseMessage.

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

Invoke(HttpRequestMessage, CancellationToken)

A delegate for the asynchronous sending of a HttpRequestMessage and the return of a HttpResponseMessage.

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