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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 3.0-beta-1, 2.3.5.Final
    • 1.2.1.GA, 2.0.GA, 2.0.1.GA, 2.2.3.GA, 2.3.2.Final, 2.3.3.Final
    • jaxrs
    • None

      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

              rsigal@redhat.com Ronald Sigal
              rhn-support-randala Rajshekhar AndalaPisharam (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: