Note that there are some explanatory texts on larger screens.

plurals
  1. POHTTP PUT deleting triples in sesame
    text
    copied!<p>I'm trying to use http PUT via cURL to update my triple store in openrdf-sesame, but I've hit a problem that I can't find a solution for.</p> <p>When using POST, the triple data uploads perfectly.</p> <p>But then using PUT, instead of adding the data provided, it deletes all the data from my repository. I've ran cURL in verbose mode, and it's giving back the expected HTTP status code. </p> <p>I've added </p> <pre><code>&lt;init-param&gt; &lt;param-name&gt;readonly&lt;/param-name&gt; &lt;param-value&gt;false&lt;/param-value&gt; &lt;/init-param&gt; </code></pre> <p>to Apache Tomcat's web.xml, Ive also tried the guide here: <a href="http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.html" rel="nofollow">HTTP PUT Guide</a>, but that hasn't helped either.</p> <p><strong>EDIT</strong> Here are the cURL commands from my batch file:</p> <pre><code>call "%curl%" -# -X POST %endpoint%/statements -H "Content-Type:application/x-trig;charset=UTF-8" -d @%%X call "%curl%" -# -X PUT %endpoint%/statements -H "Content-Type:application/x-trig;charset=UTF-8" -d @%%X </code></pre> <p>Which is essentially:</p> <pre><code>curl.exe -# -X POST http://myendpoint/statements -H "Content-Type:application/x-trig;charset=UTF-8" -d @MyTrigFile.trig curl.exe -# -X PUT http://myendpoint/statements -H "Content-Type:application/x-trig;charset=UTF-8" -d @MyTrigFile.trig </code></pre> <p>For the moment, I've disabled authentication, but otherwise I'd also include a <code>-u user:password</code> argument.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload