Skip navigation links
WebARTS Design
Java Library

Version 0.10.2
2020-11-11 (Wed), 10:42:54

Package org.apache.http.impl.client

Default HTTP client implementation.

See: Description

Package org.apache.http.impl.client Description

Default HTTP client implementation.

The usual execution flow can be demonstrated by the code snippet below:

 CloseableHttpClient httpclient = HttpClients.createDefault();
 try {
      HttpGet httpGet = new HttpGet("http://targethost/homepage");
      CloseableHttpResponse response = httpclient.execute(httpGet);
      try {
          System.out.println(response.getStatusLine());
          HttpEntity entity = response.getEntity();
          // do something useful with the response body
          // and ensure it is fully consumed
          EntityUtils.consume(entity);
      } finally {
          response.close();
      }
 } finally {
      httpclient.close();
 }
 
Skip navigation links
Copyright (C) 2001-2021, Tom B. Gutwin

WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses