code: private HttpResponse execute( HttpUriRequest request ) throws RestException
      {
          log.debug( ">>>> " + request.getRequestLine() );
          for ( Header header : request.getAllHeaders() )
          {
              log.trace( ">>>> " + header.getName() + ": " + header.getValue() );
          }
  
          HttpResponse response;
          try
          {
              response = getHttpClient().execute( request );
              log.debug( "<<<< " + response.getStatusLine() );
              for ( Header header : response.getAllHeaders() )
              {
                  log.trace( "<<<< " + header.getName() + ": " + header.getValue() );
              }
  
              if ( response.getStatusLine().getStatusCode() == 204 )
              {
                  log.debug( "Consuming quietly the response entity since server returned no content" );
                  EntityUtils.consumeQuietly( response.getEntity() );
              }
  
              checkError( response );
              return response;
          }
          catch ( KeyManagementException | NoSuchAlgorithmException | IOException e )
          {
              throw new RuntimeRestException( e );
          }
          finally
          {
              // https://issues.apache.org/jira/browse/HTTPCLIENT-1523
              DateUtils.clearThreadLocal();
          }
      }
docs: Internal execute, log headers, check for errors
  
  @param request The request object to be executed
  
  @return HttpResponse Response replied by the server
  
  @throws RestException