Hi Jonathan,
Beside the URI design recommendations with which I agree, the router should
work as expected with FIRST routing mode.
I've tested tutorial Part 11 with a modified router:
// Attach the handlers to the root router
router.attach(/users/{user},
Jonathan, I hope you don't mind the suggestion, but I wonder if you'd
be open to possibly shifting your URL scheme a little?
For example, if /user/list routes to the list of users resource,
which is what I call a collection, you might want to consider
something like this:
/users
/users/{id}
I
I ended up with a similar issue and used Router.LAST, putting the more
generic URIs first, and the most specific ones last. (ie, /user/{id}
first, then /user/list later).
In the end though, I ended up moving to /user/{id} and /users as Adam
suggests. It's definitely made our client
Generally, when one wants a list in REST style, you have two options:
/user/?additionalparameters
/users/additional/parameters/
Either way allows you to have /user/{ID}/ as a valid url.
I don't know enough about the RESTlet API to tell you, but I think your
{ID} will likely eat your /list/
4 matches
Mail list logo