src/main/java/com/uploadcare/api/RequestHelper.java
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);
        }
    }
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);
        }
    }
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.

The existence of this method(and it's return type) enables the end user to extend the
functionality of the
Uploadcare API client by creating a subclass of {@link com.uploadcare.api.Client}.

@param request    request to be sent to the API
@param apiHeaders TRUE if the default API headers should be set
@return HTTP Response object
Executes the request et the Uploadcare API and return the HTTP Response object .