Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-5902

Views: Set Accept header to "text/plain" for some requests.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.6.1
    • ambari-web
    • None

    Description

      For managed resource GET calls I wanted JSON response.

      {
       "a": "b"
      }
      

      Keeping

      @Produces({"application/json"})

      on the @GET method gives a string-serialized output of the JSON

      "{\"a\":\"b\"}"
      

      However when I keep

      @Produces({"text/plain", "application/json"})

      correctly produces JSON.

      Temporary UI Fix: Set Accept header to "text/plain" for some requests.

      Attachments

        1. AMBARI-5902.patch
          1 kB
          Antonenko Alexander

        Activity

          People

            aantonenko Antonenko Alexander
            aantonenko Antonenko Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: