IChannelResponseHandler.ResponseEnd Method

Definition

Writes the specified data to the HTTP response and completes the response asynchronously.

public System.Threading.Tasks.Task ResponseEnd(Microsoft.AspNetCore.Http.HttpResponse httpResponse, object data, System.Threading.CancellationToken cancellationToken = default);
abstract member ResponseEnd : Microsoft.AspNetCore.Http.HttpResponse * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ResponseEnd (httpResponse As HttpResponse, data As Object, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

httpResponse
HttpResponse

The HTTP response to which the data will be written. Cannot be null.

data
Object

The data to write to the response. The format and serialization depend on the implementation.

cancellationToken
CancellationToken

A token that can be used to cancel the operation.

Returns

A task that represents the asynchronous operation of writing the data and ending the response.

Applies to