I am using Ontotext GraphDB to store semantic data.
GraphDB allows to store/save sparql queries which are exposed as web services.
However I want to store/save sparql queries through HTTP POST request. Below is my query and name of the query will be Query-1
:
let $Query := fn:concat('PREFIX dc: <http://insert/>
INSERT DATA
{
dc:a@gmail.com dc:played dc:1234 .
}
')
let $EncodeUri := fn:encode-for-uri($Query)
Can anyone help me to write HTTP-POST request command to save this query in GraphDB? I want to use xdmp:http-post()
only.
To get the query result I have used xdmp:http-get('http://localhost:8080//rest/sparql/saved-queries/Query-2')
which works fine.