[aerogear-dev] {AG Controller - User Guide} A few questions

Matthias Wessendorf matzew at apache.org
Tue Mar 19 04:23:20 EDT 2013


Hi,

I read the guide
(http://staging.aerogear.org/docs/guides/aerogear-controller/) nice
work!!!!

However I have a few questions:


=====

http://staging.aerogear.org/docs/guides/aerogear-controller/routes.html

1)
public class Routes extends AbstractRoutingModule {

    @Override
    public void configuration() {
        route()
               .from("/cars/{id}")
               .on(RequestMethod.GET)
               .produces(JSON)
               .to(Cars.class).findById(param("id"));
    }
	
	
====> Could I access this only via a JSON request (e.g. "curl -v -H
"Content-type: application/json" -X GET http........./cars/123") or
also via browser (http://......../cars/123) ?


2)
Parameters
Route endpoints currently support the following types of parameters
which are all configured by using the param method:

Path
Query
Form
Header
Cookie

==> Can that be differentiated ? (e.g. path, query) Not sure I
understand the above - perhaps an example helps?
==> What happens with header "foo" and param "foo" ?




http://staging.aerogear.org/docs/guides/aerogear-controller/pagination.html

1) Should we add a link to
http://aerogear.org/docs/specs/aerogear-controller/org/jboss/aerogear/controller/router/rest/pagination/PaginationInfo.html?

2) NOT needed (not now) - but perhaps a simple PaginationStrategy
could be shown (or a link to a test case that tests a custom
PaginationStrategy)?



http://staging.aerogear.org/docs/guides/aerogear-controller/cors.html

1) where would I typically be  implementing a CORS CDI Producer?




Nice work!

-Matthias

-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf


More information about the aerogear-dev mailing list