At work I'm playing around with restlet, which is a great Java framework to implement RESTful webservices. Today, I needed to read HTTP-GET parameters in a restlet, e.g. http://localhost/restlet?someParam=foo, and came up with:
request.getResourceRef().getQueryAsForm().getFirstValue("someParam");Is this the right way to do it? I expected the get parameters to be accessible in a way similar to request.getAttributes() - because that's where the attributes go, when you have a router parse the request for you, as in: router.attach("/user/{u}/item/{i}", SomeResource.class);
Any restlet experts around?