Ben*_*tis 18 java apache-httpclient-4.x
我正在使用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)
在下载过程中我需要做什么才能取消此请求?