Closed cmungall closed 3 years ago
confirmed, the endpoint really sends back html, given the default Accept list.
I have another usecase: sparql_read_xml_result/2
seems broken, because space(remove)
causes literals to be read with whitespace characters missing. Yet agraph obviously sends me xml, because it's the first one on the list.
confirmed, the endpoint really sends back html, given the default Accept list.
So this is still open? I fear I missed it ...
causes literals to be read with whitespace characters missing
Please do not combine topics in one issue and supply an example that can be reproduced.
the swipl issue that would be mitigated by the said PR is here: https://github.com/SWI-Prolog/packages-semweb/issues/99
both issues still happen on 60891b85d1aa6e9de550899bd8bbba2819fccc21
The issue with integbio.jp can be observed by running: https://github.com/koo5/hackery2/blob/master/src/data/swipl/sparql/bug1_2.pl
Thanks. This now works using the code below. I fear there is no one size fits all for the accept header, so this is second best :cry:
:- use_module(library(semweb/sparql_client)).
%
run :- sparql_query('
select * where {
?s ?p ?o.
}
limit 1
', Row,
[ host('integbio.jp'),
path('/rdf/sparql'),
request_header('Accept' = 'application/sparql-results+xml')
]),
writeq(Row),
nl.
At biohackathon with @skwsm
Currently some endpoints do not work with the values provided here:
An example endpoint is https://integbio.jp/rdf/sparql
This one requires that only
application/sparql-results+json
orapplication/sparql-results+xml
is used with SELECT queries.We can make a PR to make an option that allows the client to override, but we are wondering if there are reasons for/against this change.