Re: [stardog-users] adding rdf+xml over http - special encoding required ?

3 views
Skip to first unread message

Mike Grove

unread,
Apr 4, 2013, 7:52:25 AM4/4/13
to stardog
On Thu, Apr 4, 2013 at 7:06 AM, Tom Geudens <tom.e...@gmail.com> wrote:
Greetings,

I'm trying to add data into the Stardog database using the http api. I'm passing what seems (!) to be valid rdf+xml in the body, I've set the Accept to application/rdf+xml ... the result however is a 415 status every time.

You should be setting the Content-Type to application/rdf+xml, or any other RDF format Stardog supports, not the accept header.

Cheers,

Mike
 

If I try to add the same data as a file with the stardog commandline, it does work.
Is there an example available of how to do this and whether or not the body of the http request should be specially encoded ?

Regards,
Tom Geudens

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
 
 

Tom Geudens

unread,
Apr 4, 2013, 7:57:28 AM4/4/13
to sta...@clarkparsia.com
Mike,

Thank you for the swift response. I'll try that in a minute. I was following the explanation in http://stardog.com/docs/network/ : "All HTTP requests that are mutative (add or remove) must include a valid Accept header set to the MIME type of the request body, where "valid" is a valid MIME type for N-Triples, Trig, Trix, Turtle, NQuads, JSON-LD, or RDF/XML."

Regards,
Tom


On Thursday, April 4, 2013 1:06:18 PM UTC+2, Tom Geudens wrote:
Greetings,

I'm trying to add data into the Stardog database using the http api. I'm passing what seems (!) to be valid rdf+xml in the body, I've set the Accept to application/rdf+xml ... the result however is a 415 status every time.

Mike Grove

unread,
Apr 4, 2013, 8:03:04 AM4/4/13
to stardog
Yeah, sorry about that, that's an error in the documentation.  Thanks for pointing it out.

Cheers,

Mike


--
Reply all
Reply to author
Forward
0 new messages