IHttpResponseBodyFeature Interface

Definition

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

C#
public interface IHttpResponseBodyFeature
Derived

Properties

Stream

The Stream for writing the response body.

Writer

A PipeWriter representing the response body, if any.

Methods

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.

DisableBuffering()

Opts out of write buffering for the response.

SendFileAsync(String, Int64, Nullable<Int64>, CancellationToken)

Sends the requested file in the response body. A response may include multiple writes.

StartAsync(CancellationToken)

Starts the response by calling OnStarting() and making headers unmodifiable.

Applies to

Product Versions
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0