public HttpResponse executeCommand ( HttpUriRequest request , boolean apiHeaders ) { if ( apiHeaders ) { setApiHeaders ( request ) ; } try { CloseableHttpResponse response = client . getHttpClient ( ) . execute ( request ) ; try { checkResponseStatus ( response ) ; return response ; } finally { response . close ( ) ; } } catch ( IOException e ) { throw new UploadcareNetworkException ( e ) ; } }
Executes the request et the Uploadcare API and return the HTTP Response object .