IChannelResponseHandler.ResponseEnd Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.