我有一些代码,我正在尝试使用Android API 21.它是使用HTTP Client 3.x版本编写的,Android使用的是HTTP客户端版本,绝对是4.x但不是4.5。所以我想知道如何专门更新这部分代码
if(getProxy() != null) {
client.getHostConfiguration().setProxy(getProxy().getHost(),getProxy().getPort());
if (HttpProxyCredentials.isProxySet()) {
AuthScope authScope = new AuthScope(getProxy().getHost(), getProxy().getPort());
client.getState().setProxyCredentials(authScope, new NTCredentials(HttpProxyCredentials.getUserName(),
HttpProxyCredentials.getPassword(),
"",HttpProxyCredentials.getDomain()));
任何人都知道如何做这个Android?