HttpClient HttpResponseMessage Address / URI

谁说我不能喝 提交于 2019-12-10 13:37:47

问题


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:


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



来源:https://stackoverflow.com/questions/11677112/httpclient-httpresponsemessage-address-uri

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!