Revision 6f9a92e5
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmServerInfo.java | ||
---|---|---|
24 | 24 |
import org.apache.http.HttpEntity; |
25 | 25 |
import org.apache.http.HttpResponse; |
26 | 26 |
import org.apache.http.client.ClientProtocolException; |
27 |
import org.apache.http.client.HttpClient; |
|
28 | 27 |
import org.apache.http.client.ResponseHandler; |
29 | 28 |
import org.apache.http.client.methods.HttpGet; |
30 | 29 |
import org.apache.http.impl.client.DefaultHttpClient; |
... | ... | |
198 | 197 |
} |
199 | 198 |
|
200 | 199 |
private String getResponse(String url) throws CDMServerException { |
201 |
HttpClient client = new DefaultHttpClient(); |
|
200 |
DefaultHttpClient client = new DefaultHttpClient();
|
|
202 | 201 |
// client = HttpClientBuilder.create().build(); |
203 | 202 |
// client.getParams(); |
204 | 203 |
HttpParams params = client.getParams(); |
... | ... | |
233 | 232 |
throw new CDMServerException(e); |
234 | 233 |
} catch (IOException e) { |
235 | 234 |
throw new CDMServerException(e); |
235 |
} finally{ |
|
236 |
client.close(); |
|
236 | 237 |
} |
237 | 238 |
return responseBody; |
238 | 239 |
} |
Also available in: Unified diff
ref #7844 Close http client after getting info