private void init(String ua) {
client = new DefaultHttpClient();
client.setRedirectHandler(new DefaultRedirectHandler() {
public URI getLocationURI(HttpResponse res, HttpContext arg1) throws ProtocolException {
URI uri = super.getLocationURI(res, arg1);
if (res.getFirstHeader("Location") != null) {
location = uri.toString();// res.getFirstHeader("Location").getValue();
}
return uri;
}
});
client.getParams().setParameter("http.useragent", ua);
}
HttpClient.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:glvideoplayer-android
作者:
评论列表
文章目录