Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​AspNetCore.​Http.​Features.​IHttpResponseBodyFeature

Assembly: Microsoft.AspNetCore.Http.Features

An aggregate of the different ways to interact with the response body.

Properties

The <see cref="T:System.IO.Stream" /> for writing the response body.
A <see cref="T:System.IO.Pipelines.PipeWriter" /> representing the response body, if any.

Methods

void
DisableBuffering​()
Opts out of write buffering for the response.
StartAsync​(System.​Threading.​CancellationToken cancellationToken = null)
Starts the response by calling OnStarting() and making headers unmodifiable.
SendFileAsync​(string path, long offset, long? count, System.​Threading.​CancellationToken cancellationToken = null)
Sends the requested file in the response body. A response may include multiple writes.
path The full disk path to the file.
offset The offset in the file to start at.
count The number of bytes to send, or null to send the remainder of the file.
cancellationToken A <see cref="T:System.Threading.CancellationToken" /> used to abort the transmission.
CompleteAsync​()
Flush any remaining response headers, data, or trailers. This may throw if the response is in an invalid state such as a Content-Length mismatch.