IHttpResponseFeature IHttpResponseFeature IHttpResponseFeature Interface


Represents the fields and state of an HTTP response.

public interface IHttpResponseFeature
type IHttpResponseFeature = interface
Public Interface IHttpResponseFeature


Body Body Body

The Stream for writing the response body.

HasStarted HasStarted HasStarted

Indicates if the response has started. If true, the StatusCode, ReasonPhrase, and Headers are now immutable, and OnStarting should no longer be called.

Headers Headers Headers

The response headers to send. Headers with multiple values will be emitted as multiple headers.

ReasonPhrase ReasonPhrase ReasonPhrase

The reason-phrase as defined in RFC 7230. Note this field is no longer supported by HTTP/2.

StatusCode StatusCode StatusCode

The status-code as defined in RFC 7230. The default value is 200.


OnCompleted(Func<Object,Task>, Object) OnCompleted(Func<Object,Task>, Object) OnCompleted(Func<Object,Task>, Object)

Registers a callback to be invoked after a response has fully completed. This is intended for resource cleanup.

OnStarting(Func<Object,Task>, Object) OnStarting(Func<Object,Task>, Object) OnStarting(Func<Object,Task>, Object)

Registers a callback to be invoked just before the response starts. This is the last chance to modify the Headers, StatusCode, or ReasonPhrase.

Applies to