相关疑难解决方法(0)

取消HttpClient请求

我正在使用Apache Commons中的HttpClient对文件进行简单的请求.这是我目前的代码:

    httpclient = new DefaultHttpClient();
    httpget = new HttpGet(location);
    context = new BasicHttpContext();
    response = httpclient.execute(httpget, context);
    entity = response.getEntity();
Run Code Online (Sandbox Code Playgroud)

在下载过程中我需要做什么才能取消此请求?

java apache-httpclient-4.x

18
推荐指数
1
解决办法
2万
查看次数

标签 统计

apache-httpclient-4.x ×1

java ×1