Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-735

URI after enabling Content negotiation (resteasy.media.type.mappings) is non-intuitive

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.2.1.GA, 2.0.GA, 2.0.1.GA, 2.2.3.GA, 2.3.2.Final, 2.3.3.Final
    • Fix Version/s: 3.0-beta-1, 2.3.5.Final
    • Component/s: jaxrs
    • Labels:
      None

      Description

      Resteasy provides way to specify alternate content types by using file extensions using resteasy.media.type.mappings. However, once mapping is done, to call a resource having query parameter in the URI, the URI needs to be specified as

      <HOST>/content-negotiation/rest/user/.xml?email=user1@abc.com (for xml)

      and

      <HOST>/content-negotiation/rest/user/.json?email=user1@abc.com (for json).

      This is non-intuitive. It would be better if mapping works with URI such as the one given below
      <HOST>/content-negotiation/rest/user.json/?email=user1@abc.com

      I am attaching the source code for the sample I created for content-negotiation

        Attachments

          Activity

            People

            Assignee:
            ron_sigal Ronald Sigal
            Reporter:
            apraj Rajshekhar AndalaPisharam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: