On 31/03/15 10:33, Olivier Rossel wrote:
I use such a code to query SPARQL endpoints:
String service = "url of endpoint";
String queryString = "a select query"
ByteArrayOutputStream os = new ByteArrayOutputStream();
QueryExecution qexec = new QueryEngineHTTP(service, queryString);
Model m = qexec.execConstruct();
m.write(os, "RDF/XML");
I need now to force the HTTP request to send its data via POST, instead of GET.
Out of curiosity: why?
How can I do that?
Note: it seems that the HTTP connection management
in QueryEngineHTTP is private, so I cannot reach it from my code.
Any help is welcome.
The unsubtle way is to set global
HttpQuery.urlLimit = 0 ;
A patch for QueryEngineHTTP to call through and use
HttpQuery.setForcePOST() would be good to receive.
Andy