freme-project / e-services

Apache License 2.0
1 stars 1 forks source link

[e-Entity] Change default input format to turtle #25

Closed jnehring closed 8 years ago

jnehring commented 8 years ago

The default input format of e-entity/dbpedia-spotlight/documents is text/plain. It should be text/turtle. Please change this in the dbpedia spotlight e-service.

bgrusdt commented 8 years ago

dbpedia spotlight correctly throws an exception with the following request (from documentation and locally with dbpedia version in freme-parent pom set to 4 and 5.0-SNAPSHOT, @jnehring do you still dont get an exception?). http://api-dev.freme-project.eu/current/e-entity/dbpedia-spotlight/documents?input=Welcome+to+Germany+,+the+capital+of+Germany+.&confidence=0.3&language=en

When informat and contentTypeHeader are both null, the NIFParameterFactory uses TURTLE as default. Postman adds the ContentTypeHeader plaintext when I send turtle data, but when I send plaintext , Postman does not add a Content-Type header and therefore the exception is thrown when I sent textplain without the informat parameter. But turtle that is sent without informat parameter is treated as plaintext...

How shall we handle this ? I will add a note to the getting-started for api-users article that it is recommended to always set the content-type header.

jnehring commented 8 years ago

Ok I did not know that postman adds plaintext as default content type header. So this is not a bug.