Migrating from HttpClient 3.x to 4.x

被刻印的时光 ゝ 提交于 2019-12-06 16:49:40

问题


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


回答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?



来源:https://stackoverflow.com/questions/6615394/migrating-from-httpclient-3-x-to-4-x

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