Ok, thanks for that information. So back to my initial concern. In this code: QueryExecution exec = QueryExecutionFactory.create(QueryFactory.create(queryString, Syntax.syntaxSPARQL_11), new DatasetImpl(ModelFactory.createDefaultModel())); exec.execConstruct().write(byteArrayOutputStream);
Is there a way to set the Accept header? (and not rely on some Jena trickery in the write(...,...) method) Envoyé de mon iPhone Le 9 janv. 2013 à 12:19, Rob Vesse <[email protected]> a écrit : > No the write() methods do not set any kind of HTTP header, it is separate > infrastructure from any HTTP request/response machinery > > > Fuseki has separate machinery that determines the appropriate writer to be > used based on the users Accept header and then sets the appropriate > Content-Type header before writing out the response > > Rob > > On 1/9/13 11:01 AM, "Olivier Rossel" <[email protected]> wrote: > >>> The current accept negotiation in Fuseki is based on >>> >>> application/rdf+xml, text/turtle, application/turtle, >>> application/x-turtle, >>> application/n-triples, text/plain >> >> Interesting, thanks for that list! >> >> >>> "Accept: text/turtle" is to be preferred. >>> >>> r.write(byteArrayOutputStream, "TTL"); >> >> So the r.write(..., ...) method effectively set an Accept header, true? >
