語言

IHttpResponseBodyFeature 介面

定義

彙整與反應體互動的不同方式。

public interface class IHttpResponseBodyFeature
public interface IHttpResponseBodyFeature
type IHttpResponseBodyFeature = interface
Public Interface IHttpResponseBodyFeature
衍生

屬性

名稱 Description
Stream

Stream撰寫回應正文。

Writer

PipeWriter A 代表回應實體(若有的話)。

方法

名稱 Description
CompleteAsync()

清除所有剩餘的回應標頭、資料或尾部。 若回應處於無效狀態,例如內容長度不匹配,可能會拋棄。

DisableBuffering()

會選擇不寫入緩衝回應。

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

在回應主體中傳送請求的檔案。 回應可能包含多次寫入。

StartAsync(CancellationToken)

啟動回應時會呼叫 OnStarting() 並讓標頭無法修改。

適用於