scotch icon indicating copy to clipboard operation
scotch copied to clipboard

Attach HttpRequestMessage to HttpResponse

Open stephenprater opened this issue 5 years ago • 1 comments
trafficstars

When you make a request using .NET's HttpClient - the HttpResponseMessage normally has the originating HttpRequestMessage attached to it on the RequestMessage property. This is useful for constructing absolute URIs from relative URLs found in the response message such as Form action attributes and relative 301/302 redirects.

To that end, Scotch should attach a reproduction of the original HttpRequestMessage to it's deserialized HttpResponseMessage.

stephenprater avatar Nov 17 '20 19:11 stephenprater

Full disclosure: I do not know F# so this is basically me stabbing in the dark until I get the test case to pass.

stephenprater avatar Nov 17 '20 19:11 stephenprater