Hi Piyush,

> /accounts/search/less_than/10000
> /accounts/search/greater_than/10000
> /accounts/search/between/10000/20000

The issue I have with this approach is that it doesn't allow to mix several
search criteria (balance_less_than=2000&status=active).

I'd like to have:
  1) /accounts/1234  -> retrieve an individual account
  2) /accounts?balance_less_than=2000&status=active  ->search

That's why I was hoping creating my restlets like so:
    attach("/accounts/[0-9]+$", new GetAccountHandler())
    attach("/accounts?[.]+$", new SearchAccountHandler())
would work.

Now, following your idea, I could do:
    attach("/accounts/search?[.]+$", new SearchAccountHandler())

and access it with  /accounts/search?balance_less_than=2000&status=active

But it kind of bothers me to have to have to specify the action twice (the http
GET method and the 'search' portion of the url).

> and restlets that support that class because they
> understand the URLs ..

Well, it turns out restlets only understand the base of the URLs.

-Vincent.



Reply via email to