从 HttpClient 3.x 迁移到 4.x [英] Migrating from HttpClient 3.x to 4.x

查看:39
本文介绍了从 HttpClient 3.x 迁移到 4.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一些使用 commons-httpclient-3.1 编写的代码需要转换为 4.1.我只是对此有点熟悉,正在阅读 4.1 httpclient 教程现在.

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.

我在这里看到一些帖子(例如 从 HttpClient 3 转换为 4a> 但那是关于一个特定的构造).似乎应该有一些文档/示例显示如何将 3.x 的使用升级到 4.x ?

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 ?

一个具体的例子:替换使用 org.apache.commons.httpclient.HttpState

One specific example: replacing use of org.apache.commons.httpclient.HttpState

推荐答案

我会替换您 IDE 中的库 jar 并查找编译器错误以开始.您可能希望返回并检查所有用法,以确保它们的使用方式相同,并且参数保持如预期(希望它们没有改变).

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).

是否有一段特定的代码您不确定如何使用 4.1?

Is there a specific piece of code you are unsure how to get working with 4.1?

这篇关于从 HttpClient 3.x 迁移到 4.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆