HttpResponse.PushPromise HttpResponse.PushPromise HttpResponse.PushPromise HttpResponse.PushPromise Method

定义

提升承诺的对象。Promotes a promised object.

重载

PushPromise(String) PushPromise(String) PushPromise(String) PushPromise(String)

此 API 用于支持将推送承诺发送到 HTTP 2.0 客户端的应用程序。This API is to support applications sending push promises to HTTP 2.0 clients. 有关 Http2 服务器推送的详细信息,请参阅 HTTP/2 规范第 8.2 节:服务器推送You can find more details regarding to Http2 server push at HTTP/2 Specification Section 8.2: Server Push.

PushPromise(String, String, NameValueCollection) PushPromise(String, String, NameValueCollection) PushPromise(String, String, NameValueCollection) PushPromise(String, String, NameValueCollection)

此 API 用于支持将推送承诺发送到 HTTP 2.0 客户端的应用程序。This API is to support applications sending push promises to HTTP 2.0 clients. 有关 Http2 服务器推送的详细信息,请参阅 HTTP/2 规范第 8.2 节:服务器推送You can find more details regarding to Http2 server push at HTTP/2 Specification Section 8.2: Server Push.

PushPromise(String) PushPromise(String) PushPromise(String) PushPromise(String)

此 API 用于支持将推送承诺发送到 HTTP 2.0 客户端的应用程序。This API is to support applications sending push promises to HTTP 2.0 clients. 有关 Http2 服务器推送的详细信息,请参阅 HTTP/2 规范第 8.2 节:服务器推送You can find more details regarding to Http2 server push at HTTP/2 Specification Section 8.2: Server Push.

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

参数

path
String String String String

推送请求的 URL。The URL of the push request. 它应为服务器想要推送到客户端的相对资源的虚拟路径。It should be the virtual path of the relative resource that the server wants to push to the client.

注解

PushPromise 是不确定性的,应用程序不应具有依赖于它的逻辑。PushPromise is non-deterministic and applications shouldn't have logic that depends on it. 在某些情况下,其唯一用途是性能优势。Its only purpose is performance advantage in some cases. 有很多条件(协议和实现)可能会导致完全忽略推送请求。There are many conditions (protocol and implementation) that may cause to ignore the push requests completely. 预期的基于火灾。The expectation is based on fire-and-forget.

PushPromise(String, String, NameValueCollection) PushPromise(String, String, NameValueCollection) PushPromise(String, String, NameValueCollection) PushPromise(String, String, NameValueCollection)

此 API 用于支持将推送承诺发送到 HTTP 2.0 客户端的应用程序。This API is to support applications sending push promises to HTTP 2.0 clients. 有关 Http2 服务器推送的详细信息,请参阅 HTTP/2 规范第 8.2 节:服务器推送You can find more details regarding to Http2 server push at HTTP/2 Specification Section 8.2: Server Push.

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

参数

path
String String String String

推送请求的 URL。The URL of the push request. 它应为服务器想要推送到客户端的相对资源的虚拟路径。It should be the virtual path of the relative resource that the server wants to push to the client.

method
String String String String

将由推送请求使用的 http 请求方法。Http request method that would be used by the push request.

headers
NameValueCollection NameValueCollection NameValueCollection NameValueCollection

将由推送请求使用的 http 请求头。Http request header that would be used by the push request.

注解

PushPromise 是不确定性的,应用程序不应具有依赖于它的逻辑。PushPromise is non-deterministic and applications shouldn't have logic that depends on it. 在某些情况下,其唯一用途是性能优势。Its only purpose is performance advantage in some cases. 有很多条件(协议和实现)可能会导致完全忽略推送请求。There are many conditions (protocol and implementation) that may cause to ignore the push requests completely. 预期的基于火灾。The expectation is based on fire-and-forget.

适用于