未发送位置标头时从 http 响应获取 URL
当与http通信时 http://forecast.weather.gov/zipcity.php 我需要获取从请求生成的 URL。
我已打印出 http 响应消息中的标头及其值,但没有位置标头。我怎样才能获得这个网址呢? (我使用的是HttpClient)
When communicating with http to http://forecast.weather.gov/zipcity.php I need to obtain the URL that is generated from a request.
I have printed out the headers and their values from the http response message but there is no location header. How can I obtain this URL? (I'm using HttpClient)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它应该类似于:
编辑:我必须进行一些小的调整,但我进行了测试并且上述工作正常。
It should be similar to:
EDIT: I had to make a couple minor tweaks, but I tested and the above works.