Code example for HttpClient

Methods: getConnectionManager

0
   
  @Override 
  public void onDestroy() { 
    super.onDestroy(); 
     
    client.getConnectionManager().shutdown();
  } 
   
  private void updateForecast(Location loc) {
    String url=String.format(format, loc.getLatitude(),
                             loc.getLongitude());
    HttpGet getMethod=new HttpGet(url);
     
    try { 
      ResponseHandler<String> responseHandler=new BasicResponseHandler();
      String responseBody=client.execute(getMethod,
                                         responseHandler);
      buildForecasts(responseBody);
       
      String page=generatePage();
Stop searching for code, let great code find you!  Add Codota to your java IDE