问题
I send the following http request to Sesame Server:
params = { 'subj' : '?s', 'pred' : 'rdf:type', 'obj' : 'Device' }
Also tried:
params = { 'pred' : 'rdf:type', 'obj' : 'Device' }
which translates to:
http://example.com/openrdf-sesame/repositories/devices/statements?pred=rdf%3Atype&subj=%3Fs&obj=Device
I perform following operation on params in PYTHON:
urllib.urlencode(params))
I get Response: 400 (Bad Request).
Please help resolving this issue. I think its related to improper encoding of predicate URI. The prefix is: '<http://example.com/devices#>
'
Reference:
http://www.openrdf.org/doc/sesame2/system/ch08.html#d0e341
回答1:
You need to provide full URIs for the request parameters. Prefixed names are not allowed. The full URIs should be in N-Triples encoded form (that is, enclosed in angle brackets).
来源:https://stackoverflow.com/questions/17740499/delete-rest-api-to-remove-statements-from-global-context