May 29th, 2012, 05:54 AM
How to reduce the URI for my RESTFul service of GET having 10 parameters
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¶m2=xyz¶m3=123...&par am10=lastparam.
Please let me know if anybody has an answer
May 30th, 2012, 12:04 PM
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.
Jun 1st, 2012, 08:18 AM
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.
Tags for this Thread