Re: asking for multiple fragments from the same resource

Matt McClure <[email protected]> Wed, 5 Feb 2014 10:00:12 -0500
Newsgroups gmane.comp.web.services.rest
Message-ID <CAJELnLEz_G-fu8OF84DG_WqBRZ1F23vaQrjWd0QBej0vQY3ZFQ@mail.gmail.com>
Some rules of thumb that might help:

1. Fragments are for client-side use. In general, the client shouldn't send
the fragment portion of the URL to the server.
2. Query strings are for both clients and servers. The server can expect
the client to compose a query string from many parts.
3. URI paths are for servers. The client should treat the path portion as
opaque and avoid parsing it or composing it.
4. There's a convention mentioned in RFC 3986 indicating to use ';' to
separate the hierarchical portion of a URI path from a non-hierarchical
part. Both parts remain opaque to the client; the distinction should only
be meaningful to the server.


On Mon, Feb 3, 2014 at 12:50 PM, <[email protected]> wrote:

>
>
> I have this resource...
>
>
> example.com/my/api/32
>
>
> It returns 'n' pieces of data. I want to return only one "data_q"...
>
> example.com/my/api/32#data_q
>
>
> easy enough. But what, in your view, should done if I want 3 pieces of
> data?
>
> I really don't think this is kosher...
>
> example.com/my/api/32#data_a#data_q#data_z
>
> I really do't think asking for multiple fragments constitutes a query...
>
> example.com/my/api/32?data=data_a,data_q,data_z
>
>
> I would love to hear your ideas.
>
> Thank you
>
> Walter
>
>  
>



-- 
Matt McClure
http://matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure