使用 apache HttpClient 的最终 URL(在所有重定向之后)
使用 HttpMethod.setFollowRedirects(true)
时如何获取 Http 请求的最终 URL。我正在使用 apache Httpclient - GetMethod。
How do I get the final URL of a Http request when I use HttpMethod.setFollowRedirects(true)
. I am using apache Httpclient - GetMethod
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过
method.getURI()
或按照 Stephen 的建议 -method.getPath()
?Have you tried
method.getURI()
, or as suggested by Stephen -method.getPath()
?