Hi Alessandro.
Thank you for your instructions. I was able to create a recipe
"http://www.dfki.de/mere01/recipe/r1" via PUT.
Now, when trying to upload/create a new rule, I again get the Method not
allowed error.
curl -i -X POST -F "recipe=http://www.dfki.de/mere01/recipe/r1" -F
"description=first_rule" -F
"rule=http://www.dfki.de/mere01/rules/R.has_transitive" -F
"kres-syntax=has(, ?x, ?z) . has(, ?z, ?y) -> has(, ?x, ?y)"
http://<stanbol>/rules/recipe/
HTTP/1.1 100 Continue
HTTP/1.1 405 Method Not Allowed
Allow: GET,OPTIONS,HEAD
Content-Type: text/html; charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1396
Server: Jetty(6.1.x)
(the same if I send it just to <stanbol>/rules, as it sais in the docu).
I guess my request is not correct?
So, when stating
curl -i -X POST -d recipe="r1" -d description="A test recipe."
http://<stanbol>/rules/recipe
I get as response:
HTTP/1.1 405 Method Not Allowed
Allow: GET,OPTIONS,HEAD
Content-Type: text/html; charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1395
Server: Jetty(6.1.x)
Am I doing it the wrong way, or do I need the methods POST (and
DELETE) to be allowed from server-side ?
you have to PUT /rules/recipe/r1 and then POST the rules onto that
resource.
but as I said, there might be problems if you try to refactor an
ontology afterwards. If so, maybe for the time being you're better off
using
/rules/recipe/http://www.dfki.de/melanie/recipe/r1
or something like that.
And don't forget that resource expects multipart formdata in the POST
HTH
Alessandro