HttpResponseMessage.RequestMessage Property

.NET Framework (current version)
 

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

Namespace:   System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)

public HttpRequestMessage RequestMessage { get; set; }

Property Value

Type: System.Net.Http.HttpRequestMessage

The request message which led to this response message.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: