HttpResponse.PushPromise Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Promotes a promised object.
Overloads
PushPromise(String) |
Supports applications sending push promises to HTTP 2.0 clients. For more information, see HTTP/2 Specification Section 8.2: Server Push. |
PushPromise(String, String, NameValueCollection) |
Supports applications sending push promises to HTTP 2.0 clients. For more information, see HTTP/2 Specification Section 8.2: Server Push. |
PushPromise(String)
Supports applications sending push promises to HTTP 2.0 clients. For more information, see 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)
Parameters
- path
- String
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.
Remarks
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 push requests to be ignored. The expectation is based on fire-and-forget.
Applies to
PushPromise(String, String, NameValueCollection)
Supports applications sending push promises to HTTP 2.0 clients. For more information, see 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)
Parameters
- path
- String
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
Http request method that would be used by the push request.
- headers
- NameValueCollection
Http request header that would be used by the push request.
Remarks
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 push requests to be ignored. The expectation is based on fire-and-forget.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기