On 03/08/10 14:36, Harald Pehl wrote:
> In our current project we have lots of resources which return a subset of
> bigger datasets. For that the paging information is provided as part of the
> URL:
>
> /<some resource>/{offset}/{limit}[/{sortBy}[/{sortDirection}]]
>
> [] parts are optional. So valid URLs are
> /customers/0/50
> /customers/0/50/name
> /customers/0/50/createdAt/desc
>
> This works perfectly up to the fact that lots of request attributes are
> occupied. For example we cannot map the URL "/customers/orders/{orderId}",
> because it is already used for "/customers/{offset}/{limit}.
Perhaps you could use the query part for these things:
/customers/?offset=50&limit=20&sortBy=name&sortDirection=asc
I think this might help make the implementation easier on both sides.
Best wishes,
Bruno.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2642347