You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Fabian Christ (Resolved) (JIRA)" <ji...@apache.org> on 2011/11/29 12:21:40 UTC
[jira] [Resolved] (STANBOL-101) Better control of returned format
[ https://issues.apache.org/jira/browse/STANBOL-101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabian Christ resolved STANBOL-101.
-----------------------------------
Resolution: Fixed
> Better control of returned format
> ---------------------------------
>
> Key: STANBOL-101
> URL: https://issues.apache.org/jira/browse/STANBOL-101
> Project: Stanbol
> Issue Type: Improvement
> Components: Enhancer
> Reporter: Fabian Christ
> Assignee: Fabian Christ
> Labels: Accept-Header, Enhancer,, Format,
>
> Currently, you can define the returned format for the Enhancer by setting the 'accept' header. The value of the 'format' field provided in the payload seems not to be used internally.
> If you set the accepted content to 'application/json' the Enhancer returns JSON format as expected:
> curl -X POST -H "Accept: application/json" -H "Content-type: text/plain" \
> --data "Fise can detect famous cities such as Paris." \
> http://localhost:8080/engines/
> If you leave the accept header blank, JSON-LD format is returned. But there is no way to explicitly force the system to return JSON-LD.
> curl -X POST -H "Accept: " -H "Content-type: text/plain" \
> --data "Fise can detect famous cities such as Paris." \
> http://localhost:8080/engines/
> Stanbol should define which is the default format officially and provide a consistent way to control the returned format. Perhaps it would be useful to return the supported formats through the REST API.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira