Controller Method file extensions? (.xml or .php) |
[eluser]Fenix[/eluser]
[quote author="xwero" date="1240601162"] Query strings make it difficult for the user to build their custom data request. Isn't http://mysite.com/api/categories/orderby...=555555555 easier to understand than http://mysite.com/api/categories.xml?acc...&sort=desc [/quote] I think you are contradicting yourself with this one. URLs are hierarchical. It is much easier for the user to see the key-value pairs in the query string. It also eliminates confusion when you get into required vs optional parameters. I also believe you lose site of the actual endpoint you are trying to access if you use your method. I am not completely abandoning your method however. There are circumstances when appropriate data will be passed before the query string. Example: api/user/{user name}/items?from_date=123456&to_date=123556&sort=desc Moreover, this is how many, if not most, REST APIs work. Digg API Last.fm API Flickr API |
Welcome Guest, Not a member yet? Register Sign In |