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);
  }
}

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 ) ; } }
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 .
