Announcement Announcement Module
Collapse
No announcement yet.
How to reduce the URI for my RESTFul service of GET having 10 parameters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to reduce the URI for my RESTFul service of GET having 10 parameters

    Hi:
    We are developing RESTFul webservice for our project using Spring MVC 3.0.5.
    We have a resource which can be identified by 10 different parameters, if I add all these parameters as URI query parameters, the URI is becoming too big and all the parameters are visible.

    Is there any way to shorten the URI like by using HttpMessage Headers.
    currently the URI looks some thing like"http://localhost:/rest/myresource?param1=abc&param2=xyz&param3=123...&par am10=lastparam.


    Please let me know if anybody has an answer

    Regards
    Sreedhar

  • #2
    Hi Sreedhar,

    first I would like to note the kind of URI you're using is not much REST-friendly. Here you have some good design tips.

    Here is a post you can check about where to put parameters.

    Best,
    Carlos

    Comment


    • #3
      Hi Carlos
      Thanks for the link, the service is like a search where in it can be identified by around 5 parameters.

      We have some generic values, which we will be passing through Request Header.

      /Sreedhar

      Comment

      Working...
      X