/** * Sends an HTTP request * * @param method an HTTP method * @param auth true to request with authentication, false to request without * @return HTTP status code * @throws IOException if an error occurred during the HTTP request */ public int executeMethod(HttpMethodBase method, boolean auth) throws IOException { log.trace("{} {}", method.getName(), method.getURI()); int status = getHttpClient(auth).executeMethod(method); log.trace("{} {}", status, HttpStatus.getStatusText(status)); return status; } }