删除rest api从全局上下文中删除语句 [英] delete rest api to remove statements from global context
问题描述
我将以下http请求发送到Sesame Server:
I send the following http request to Sesame Server:
params = { 'subj' : '?s', 'pred' : 'rdf:type', 'obj' : 'Device' }
也尝试过:
params = { 'pred' : 'rdf:type', 'obj' : 'Device' }
其翻译为:
我对PYTHON中的参数执行以下操作:
I perform following operation on params in PYTHON:
urllib.urlencode(params))
我得到响应:400(错误请求).
I get Response: 400 (Bad Request).
请帮助解决此问题.我认为这与谓词URI的编码不正确有关.前缀是:"<http://example.com/devices#>
"
Please help resolving this issue. I think its related to improper encoding of predicate URI. The prefix is: '<http://example.com/devices#>
'
参考:
http://www.openrdf.org/doc/sesame2/system/ch08.html#d0e341
推荐答案
您需要为请求参数提供完整的URI.不允许使用前缀名称.完整的URI应该采用N-Triples编码形式(即,用尖括号括起来).
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).
这篇关于删除rest api从全局上下文中删除语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!