REST Url for Lists -


Assume that I have a method that gives a list of customers and lists the states and sizes as input , Something like

Customers coming back (NY, CA, Texas) and in size (small, medium)

How should the best REF URL be used? The problem is that it is a query and does not point to any particular resource.

  1. somesite.com/customers?state=NY,CA,TX&size=small, Mediaiyam (old style)
  2. Here are some options I Somesite Com / customers / state / NY, CA, TX / size / small, medium
  3. somesite.com/customers/state=NY,CA,TX/size=small,medium
  4. Somesite.com/customers/state (NY, CA, TX) / size (small, medium)

Personally, I use the fourth approach, but with the '+' symbol instead of parenthesis:

  somesite.com/customers/NY+CA+TX/small + Medium  

Silk-style your model is not not necessary for you Mr. Strong resource you should offer. .. You can add any number of artificial resources such as you look fit, even people who need joints from your models.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -