编程语言
首页 > 编程语言> > java-断开HttpClient的连接

java-断开HttpClient的连接

作者:互联网

如何断开组织.apache.http.client.HttpClient对象?
我正在创建它,但是它没有任何disconnect()或getHttpConnectionManager!

HttpClient httpclient = new DefaultHttpClient();

谢谢

解决方法:

采用

httpClient.getConnectionManager().shutdown();

See examples.

注意:getHttpConnectionManager来自HttpClient 3.1.

标签:disconnect,httpclient,java
来源: https://codeday.me/bug/20191101/1985986.html