delete rest api to remove statements from global context

我们两清 提交于 2019-12-11 08:25:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!