Greetings, Restletfarians,
Today I was implementing a handler for a POST method for a Users resource that
takes an email parameter such as:
testapplication/[EMAIL PROTECTED]
I handled this using a router and a URI pattern, as follows:
router.attach("/users?email={email}", UsersResource.class);
This works fine, but now I'm nervous about the case of multiple parameters.
Let's say I want to add a timezone parameter for this user:
testapplication/[EMAIL PROTECTED]&timezone=HST
I could handle this as follows:
router.attach("/users?email={email}&timezone={timezone}",
UsersResource.class);
But then I've hardwired the ordering and the following request would apparently
fail:
testapplication/users?timezone=HST&[EMAIL PROTECTED]
I checked the JavaDoc for the Router class and it was not forthcoming on this
issue. Could someone enlighten me as the appropriate way to handle parameters
in an order-independent fashion?
Thanks,
Philip