Hi all, 

i try to run rdflib 5.0 with the SPARQLUpdateStore against graphdb from 
ontotext (actually against their rdf4j RestAPI) . 

Anybody knows how I could do SPARQL UPDATE queries with rdflib 5.0 against 
their store. 

Authentication works but i get an HTTP response code of 415 with message 
"unrecognized mime type".
I assume it is because rdflib currently sends the data as byte string.
And it seems we would need the POST body to start with "update: INSERT ...".
Also i do not see that the Content-Type header field is set in the POST 
request. 

Looking at the removed SPARQLWrapper library is see that SPARQL update POST 
queries can be encoded in two ways:
if self.requestMethod == POSTDIRECTLY:
    request.add_header("Content-Type", "application/sparql-update")
    request.data = self.queryString.encode('UTF-8')
else:  # URL-encoded
    request.add_header("Content-Type", "application/x-www-form-urlencoded")
    request.data = self._getRequestEncodedParameters(("update", 
self.queryString)).encode('ascii')

Best
 Jürgen

-- 
http://github.com/RDFLib
--- 
You received this message because you are subscribed to the Google Groups 
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rdflib-dev/ea45bc2a-d924-49f6-b345-a9263ac2c37e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to