question: private HttpResponse sendTupleQueryViaHttp ( HttpUriRequest method , Set < QueryResultFormat > tqrFormats ) throws RepositoryException , IOException , QueryInterruptedException , MalformedQueryException { final List < String > acceptValues = new ArrayList < String > ( tqrFormats . size ( ) ) ; for ( QueryResultFormat format : tqrFormats ) { int qValue = 10 ; if ( preferredTQRFormat != null && ! preferredTQRFormat . equals ( format ) ) { qValue -= 2 ; } for ( String mimeType : format . getMIMETypes ( ) ) { String acceptParam = mimeType ; if ( qValue < 10 ) { acceptParam += ";q=0." + qValue ; } acceptValues . add ( acceptParam ) ; } } method . addHeader ( ACCEPT_PARAM_NAME , commaJoiner . join ( acceptValues ) ) ; try { return executeOK ( method ) ; } catch ( RepositoryException | MalformedQueryException | QueryInterruptedException e ) { throw e ; } catch ( RDF4JException e ) { throw new RepositoryException ( e ) ; } }
target:  Send the tuple query via HTTP and throws an exception in case anything goes wrong, i.e. only for HTTP 200 the method returns without exception. If HTTP status code is not equal to 200, the request is aborted, however pooled connections are not released.