Results 1 to 3 of 3

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

  1. #1
    Join Date
    May 2012
    Posts
    6

    Question 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. #2

    Default

    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

  3. #3
    Join Date
    May 2012
    Posts
    6

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •