HttpServer.SendAsync Method
Dispatches an incoming HttpRequestMessage.
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Protected Overrides Function SendAsync ( _
request As HttpRequestMessage, _
cancellationToken As CancellationToken _
) As Task(Of HttpResponseMessage)
'Usage
Dim request As HttpRequestMessage
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of HttpResponseMessage)
returnValue = Me.SendAsync(request, _
cancellationToken)
protected override Task<HttpResponseMessage> SendAsync(
HttpRequestMessage request,
CancellationToken cancellationToken
)
protected:
virtual Task<HttpResponseMessage^>^ SendAsync(
HttpRequestMessage^ request,
CancellationToken cancellationToken
) override
abstract SendAsync :
request:HttpRequestMessage *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
override SendAsync :
request:HttpRequestMessage *
cancellationToken:CancellationToken -> Task<HttpResponseMessage>
protected override function SendAsync(
request : HttpRequestMessage,
cancellationToken : CancellationToken
) : Task<HttpResponseMessage>
Parameters
request
Type: HttpRequestMessageThe request to dispatch.
cancellationToken
Type: System.Threading.CancellationTokenThe token to monitor for cancellation requests.
Return Value
Type: System.Threading.Tasks.Task<HttpResponseMessage>
A task representing the asynchronous operation.