HttpResponseWrapper.PushPromise 方法

定義

提升承諾的物件。

多載

PushPromise(String)

支援傳送推送 Promise 給 HTTP 2.0 用戶端的應用程式。 如需詳細資訊,請參閱 HTTP/2 Specification Section 8.2:Server Push (HTTP/2 規格第 8.2 節:伺服器推送。

PushPromise(String, String, NameValueCollection)

支援傳送推送 Promise 給 HTTP 2.0 用戶端的應用程式。 如需詳細資訊,請參閱 HTTP/2 Specification Section 8.2:Server Push (HTTP/2 規格第 8.2 節:伺服器推送。

PushPromise(String)

支援傳送推送 Promise 給 HTTP 2.0 用戶端的應用程式。 如需詳細資訊,請參閱 HTTP/2 Specification Section 8.2:Server Push (HTTP/2 規格第 8.2 節:伺服器推送。

public:
 override void PushPromise(System::String ^ path);
public override void PushPromise (string path);
override this.PushPromise : string -> unit
Public Overrides Sub PushPromise (path As String)

參數

path
String

推播要求的 URL。 它應為伺服器想要推送到用戶端之相對資源的虛擬路徑。

備註

PushPromise 不具決定性,而且應用程式不應該有相依的邏輯。 其唯一用途是在某些情況下的效能優勢。 (通訊協定和實作) 有許多條件可能會忽略推播要求。 預期是以引發和忘記為基礎。

適用於

PushPromise(String, String, NameValueCollection)

支援傳送推送 Promise 給 HTTP 2.0 用戶端的應用程式。 如需詳細資訊,請參閱 HTTP/2 Specification Section 8.2:Server Push (HTTP/2 規格第 8.2 節:伺服器推送。

public:
 override void PushPromise(System::String ^ path, System::String ^ method, System::Collections::Specialized::NameValueCollection ^ headers);
public override void PushPromise (string path, string method, System.Collections.Specialized.NameValueCollection headers);
override this.PushPromise : string * string * System.Collections.Specialized.NameValueCollection -> unit
Public Overrides Sub PushPromise (path As String, method As String, headers As NameValueCollection)

參數

path
String

推播要求的 URL。 它應為伺服器想要推送到用戶端之相對資源的虛擬路徑。

method
String

推播要求要使用的 HTTP 要求方法。

headers
NameValueCollection

推播要求要使用的 HTTP 要求標頭。

備註

PushPromise 不具決定性,而且應用程式不應該有相依的邏輯。 其唯一用途是在某些情況下的效能優勢。 通訊協定和實作 (有許多條件) ,可能會導致忽略推播要求。 預期是以引發和忘記為基礎。

適用於