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

Definition

Gets or sets the request message that led to this response message.

public : HttpRequestMessage RequestMessage { get; set; }
HttpRequestMessage RequestMessage();

void RequestMessage(HttpRequestMessage requestmessage);
public HttpRequestMessage RequestMessage { get; set; }
Public ReadWrite Property RequestMessage As HttpRequestMessage
var httpRequestMessage = httpResponseMessage.requestMessage;
httpResponseMessage.requestMessage = httpRequestMessage;

Property Value

The request message that led to this response message.

Remarks

This property is the request message that led to this response message. For 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. This property can be used to determine what URI actually created the response (useful in case of redirects).