Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-101

Better control of returned format

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              fchrist Fabian Christ
              fchrist Fabian Christ
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: