Partager via


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

    The request to dispatch.

Return Value

Type: System.Threading.Tasks.Task<HttpResponseMessage>
A task representing the asynchronous operation.

See Also

Reference

HttpServer Class

System.Web.Http Namespace