Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-1067

Controller produces: defaults to render JSON in a browser (text/html) view

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.0.CR1
    • Fix Version/s: 1.future
    • Component/s: controller
    • Labels:
      None

      Description

      Using the browser to directly access (GET) endpoints is usally (at
      least for me) a very convenient way to quickly check things.
      With the controller, when the RESTFul endpoint is configured to
      produce "JSON", a URL like this (in the browser)

      http://localhost:8080/scaffoldtester/customers

      returns 404

      However, with curl (curl -v -H "Accept: application/json" -H
      "Content-type: application/json" -X GET
      http://localhost:8080/scaffoldtester/customers/)
      It works since we explicitly specifiy the application/json

      I wonder.... if there could be a nicer way, to allow JSON, and the
      TEXT/HTML - without adding more produces() ?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                danielpassos Daniel Passos
                Reporter:
                mwessendorf Matthias Wessendorf
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: