I know that the following remote HTTP IRI can be parsed directly with 'curl http://xxx' because they return RDF data directly:
But I don't know how the following remote HTTP IRI can be parsed directly, because they don't return RDF data directly:
How to get RDF data returned by remote HTTP IRI through
linux curl(e.g. DBpedia, GENEPIO ...) ?Best regards
CodePudding user response:
You have to set the
Acceptheader to specify which MIME types you accept/prefer:curl -L -H "Accept: text/turtle; q=1.0, application/rdf xml; q=0.5" http://dbpedia.org/resource/Resource_Description_FrameworkIn this case, you would prefer Turtle (relative quality factor of 1.0) over RDF/XML (0.5).
(The option
-Llets curl follow redirects. For example, fromhttp://dbpedia.org/resource/Resource_Description_Frameworktohttp://dbpedia.org/data/Resource_Description_Framework.ttl.)

