Hi Alessandro, Melanie,

@Alessandro, thanks for the answer.

@Melanie, to be able to submit an LDPath program, the correct usage with
curl are is follows. Currently, this endpoint does not support sending
requests with (form-multipart) objects.

curl -i -X POST -d "name=melaniesIndex&program=@prefix rdf :
<http://www.w3.org/1999/02/22-rdf-syntax-ns#
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>; @prefix rdfs :
<http://www.w3.org/2000/01/rdf-schema#
<http://www.w3.org/2000/01/rdf-schema#>>; @prefix db-ont :
<http://dbpedia.org/ontology/>; title = rdfs:label :: xsd:string;
dbpediatype = rdf:type :: xsd:anyURI; population =
db-ont:populationTotal :: xsd:int;"
http://<stanbol>/contenthub/ldpath/program

Also, I fixed the CORS support issues you mentioned. Please let me know
if you have any other problems.

Best,
Suat


On 07/16/2012 12:36 PM, Alessandro Adamou wrote:
> Hi Melanie,
>
> I can see that path has a preflight handling function, so it should
> support CORS.
>
> However it doesn't specify the allowed methods. Perhaps the line
>
> enableCORS(servletContext, res, headers);
>
> should be
>
> enableCORS(servletContext, res, headers, GET, POST, DELETE, OPTIONS);
>
> like I had to do for the ontologymanager endpoint to work?
>
> --Alessandro
>
>
> On 7/15/12 7:55 PM, Melanie Reiplinger wrote:
>> Hi Rupert, Alessandro.
>>
>> Is it possible that we still do not have CRUD access on the contenthub?
>>
>> When doing a DELETE on
>>
>> <stanbol>/contenthub/contenthub/store/<itemID>,
>>
>> I'm getting
>>
>> Access-Control-Allow-Methods: GET, POST, OPTIONS
>>
>> as response to the preflight request (so DELETE would be missing then).
>>
>> The same problem for
>> <stanbol>/contenthub/ldpath/program/<indexID>.
>>
>> When trying to create an index by sending a FormData object
>> (form-multipart) to contenthub/ldpath/program, my request gets stuck.
>> I can't even get through with curl:
>>
>> curl -i -X POST -F 'name=melaniesIndex' -F "program='@prefix rdf :
>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>; @prefix rdfs :
>> <http://www.w3.org/2000/01/rdf-schema#>; @prefix db-ont :
>> <http://dbpedia.org/ontology/>; title = rdfs:label :: xsd:string;
>> dbpediatype = rdf:type :: xsd:anyURI; population =
>> db-ont:populationTotal :: xsd:int;'"
>> http://<stanbol>/contenthub/ldpath/program
>>
>> I get Unsupported Media Type error. I guess there's some issue with
>> the @ symbols in the program (normally they are used to reference
>> files), but escaping them was of no use.
>>
>>
>> And one more minor thing:
>>
>> For
>> curl -i -X DELETE <stanbol>/contenthub/ldpath/program/melaniesIndex
>>
>> I get
>> HTTP/1.1 200 OK
>> Content-Length: 0
>> Server: Jetty(6.1.x)
>>
>> even if the index does not exist any more (i.e., if it has been
>> deleted before).
>>
>> g
>> melanie
>>
>>
>
>

Reply via email to