Search the web
Sign In
New User? Sign Up
rest-discuss · REST Discussion Mailing List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Query string format   Message List  
Reply | Forward Message #11011 of 14251 |
I am currently developing a RESTful Web Service and will be using
query strings extensively.

There seems to be no guide line regarding how to form the query
strings and parse it , in a uniform manner.

For instance some frameworks like Windows Communication Foundation
treat query strings as a part of URI.

For example http://localhost//MyResources/{Id}/State

Here Id is treated as a query string and the value of Id is provided
as a part of URI

Something like this -> http://localhost//MyResources/1/State

However most frameworks treat query strings as key value pairs.
Something like http://localhost//MyResources/State?Id =1

RFC 3986 says both mechanisms MAY be used.

Is there a uniform format for specifying the query strings?








Wed Jul 9, 2008 11:27 am

prashanthshe...
Offline Offline
Send Email Send Email

Forward
Message #11011 of 14251 |
Expand Messages Author Sort by Date

I am currently developing a RESTful Web Service and will be using query strings extensively. There seems to be no guide line regarding how to form the query ...
prashanthshenoyu
prashanthshe...
Offline Send Email
Jul 9, 2008
11:27 am

This is strictly implementation level detail. Unless you are expecting clients to manufacture URIs by using HTML forms or URI templates or some other...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 9, 2008
3:03 pm

So I could be wrong here, but I thought what prashanthshenoyu describes is infact standard... in that.. http://localhost//MyResources/{Id}/State would be...
Kevin Duffey
andjarnic
Offline Send Email
Jul 9, 2008
6:28 pm

Kevin, ... I don't quite follow your point and I'm not sure which part you mean is standard, but there's certainly nothing about classes or instances that is...
Justin Sheehy
macsithigh_f...
Offline Send Email
Jul 9, 2008
8:26 pm

This is just a convention adopted by an implementation. RoR has a similar convention, but there is nothing standard about it. It is all about convenience to...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 9, 2008
9:29 pm

... Agreed that it's just a convention, and that neither is "standard" in any sense. But there is (at least) one important consideration that might affect...
Craig McClanahan
craig_mcclan...
Offline Send Email
Jul 9, 2008
11:14 pm

... Craig - which cache are you talking about? Request parameters are indeed part of the URI, and if a cache is ignoring it, it is broken. Subbu...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 10, 2008
12:06 am

At Wed, 09 Jul 2008 15:32:17 -0700, ... Do you have an example of a cache which exhibits this behavior? The subtleties of web caching have often eluded me, but...
Erik Hetzner
e_hetzner
Offline Send Email
Jul 10, 2008
12:06 am

... Interesting ... I first noticed this behavior with Squid[1], when I was experimenting with trying to cache the results of Google-like search requests that ...
Craig McClanahan
craig_mcclan...
Offline Send Email
Jul 10, 2008
2:41 am

... That's an interesting conclusion to come to. By that conclusion, most of cache hits on the web will be negative - i.e., http://mystore.com,...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 10, 2008
3:27 am

... Yep, it would. Treating them as non-cacheable is lesser evil than that :-). ... It denies on '?' characters as well, by default. ... Did a bit more...
Craig McClanahan
craig_mcclan...
Offline Send Email
Jul 10, 2008
5:06 am

... That's good point. They do not represent the same resource. If the sever thinks that the resource is indeed the same, it could very well use the...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 10, 2008
5:37 am

... A cache is not allowed to do that: "A cache cannot assume that an entity with a Content-Location different from the URI used to retrieve it can be used to...
Brian Smith
brian@...
Send Email
Jul 11, 2008
1:38 am

Thanks for picking up. I missed that....
Subbu Allamaraju
sallamar
Offline Send Email
Jul 11, 2008
2:32 pm

... The resource to my mind is "http://localhost/mysubresource". In other words most of these problems go away if you avoid using parameters to identify...
Bill de hOra
bdehora
Offline Send Email
Jul 10, 2008
8:02 pm

... Not to mention how badly some of these innovative(?) frameworks treat caching, and their particular distaste for GET ... Subbu...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 10, 2008
9:19 pm

At Wed, 9 Jul 2008 20:28:13 -0700, ... In any case I think that there is some confusion in this thread, between a) treating the URIs: http://example.org/index ...
Erik Hetzner
e_hetzner
Offline Send Email
Jul 10, 2008
5:33 pm

... Today, this directive from 2616 is mostly meaningless since rewrite rules can be used to turn query params into path segments and vice versa, and so...
Subbu Allamaraju
sallamar
Offline Send Email
Jul 10, 2008
6:49 pm

... If that were true the cache in question would be broken (as others have pointed out). What you are probably thinking of is that many caches are configured...
Aristotle Pagaltzis
a22pag
Offline Send Email
Jul 10, 2008
2:07 am

Kevin, this is exactly what prompted me to ask the question in the first place.   Semantically the two formats of the query string seem to be different to me ...
Prashanth Shenoy
prashanthshe...
Offline Send Email
Jul 10, 2008
8:36 am

Hi Prashanth, ... actually, the URI carries no semantics at all, as far as clients are concerned. The server may parse the URI, but to clients it is nothing...
Aristotle Pagaltzis
a22pag
Offline Send Email
Jul 10, 2008
12:41 pm

Ah, my bad then. I thought there was a general direction the REST community at large was taking with regards to the URI and how it breaks down, hence my use of...
Kevin Duffey
andjarnic
Offline Send Email
Jul 9, 2008
10:39 pm

... No. There are at most vague guidelines. I use this criterion: do I want to parametrise a computed resource, or is the thing I want an application level...
Aristotle Pagaltzis
a22pag
Offline Send Email
Jul 10, 2008
2:16 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help