从 HttpClient 3.x 迁移到 4.x
我们有一些使用 commons-httpclient-3.1 编写的代码需要转换为 4.1。我对此只是有点熟悉,正在阅读 4.1 httpclient 教程现在。
我在这里看到了几篇文章(例如 从 HttpClient 3 转换为 4 但是这是关于特定的构造)。似乎应该有一些文档/示例展示如何将 3.x 的使用升级到 4.x ?
一个具体示例:替换 org.apache.commons.httpclient.HttpState 的使用
We have some code written using commons-httpclient-3.1 that needs to be converted to 4.1. I'm only somewhat familiar with this and am reading the 4.1 httpclient tutorial now.
I see a couple of posts here (e.g. Converting from HttpClient 3 to 4 but that's about a specific construct). Seems like there should be some docs/examples somewhere showing how to upgrade usage of 3.x to 4.x ?
One specific example: replacing use of org.apache.commons.httpclient.HttpState
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会替换 IDE 中的库 jar,并首先查找编译器错误。您可能希望返回并检查所有用法,以确保它们以相同的方式使用,并且参数保持预期状态(希望它们没有改变方向)。
是否有一段特定的代码您不确定如何使用 4.1?
I would replace the library jar(s) in your IDE and look for compiler errors to start with. You may wish to go back and check all usages to ensure they are used the same way, and parameters remain as expected (hopefully they didn't switch things around).
Is there a specific piece of code you are unsure how to get working with 4.1?