HttpClient HttpResponseMessage Address / URI

2019-06-20 14:48发布

I am developing a C# WinRT application that makes POST and GET requests to a webserver.

Does anyone know if there is a way to get the Response URI / Address when using a HttpClient object?.

If I use the HttpWebRequest / HttpWebResponse classes, then I can get this information (via the ResponseUri property in HttpWebResponse), but I don't see how to obtain it using the HttpClient / HttpResponseMessage classes.

Thanks

1条回答
迷人小祖宗
2楼-- · 2019-06-20 15:29

This is two years old, but I just came across this question with the exact same desire, and it was answered in a comment by @PeterRitchie, so I am copying that for future visitors.

I think you can get the redirected UI from HttpResponseMessage.RequestMessage.RequestUri

查看更多
登录 后发表回答