HttpResponseMessage.RequestMessage HttpResponseMessage.RequestMessage HttpResponseMessage.RequestMessage HttpResponseMessage.RequestMessage Property


获取或设置导致此响应消息的请求消息。Gets or sets the request message which led to this response message.

 property System::Net::Http::HttpRequestMessage ^ RequestMessage { System::Net::Http::HttpRequestMessage ^ get(); void set(System::Net::Http::HttpRequestMessage ^ value); };
public System.Net.Http.HttpRequestMessage RequestMessage { get; set; }
member this.RequestMessage : System.Net.Http.HttpRequestMessage with get, set
Public Property RequestMessage As HttpRequestMessage


导致此响应消息的请求消息。The request message which led to this response message.


此属性设置为导致此响应消息的请求消息。This property is set to the request message which led to this response message. 在使用发送的请求的情况下HttpClient,此属性将指向通向最终响应的实际请求消息。In the case of a request sent using HttpClient, this property will point to the actual request message leading to the final response. 请注意,这可能不是用户提供的发送请求时,同一消息。Note that this may not be the same message the user provided when sending the request. 如果需要重定向或身份验证由于重新发送请求,这通常是这种情况。This is typically the case if the request needs to be resent due to redirects or authentication. 此属性可以用于确定是什么 URL 实际上创建响应 (用于重定向出现)。This property can be used to determine what URL actually created the response (useful in case of redirects).