[undertow-dev] REST routing

Bill O'Neil oneil5045 at gmail.com
Mon Apr 7 23:23:42 EDT 2014


I was curious what the best practices would be for url routing with many
endpoints.

For example

POST /user/
GET /user/{userId}
GET /document/{documentId} ContentType=appliction/json (only respond when
json is requested)

What would be the best option for this?  I was able to achieve most of what
i wanted using the PredicatesHandler class.  Is this a good choice?

This would build a List of PredicatedHandlers as well as the fall through
handler which I would use as a 404.  I got an example working using the
text predicate format

method[GET] and path-template[value=\"/user/{userId}\"]


Is this a good approach or are there better recommendations?


Thanks,

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20140407/0de908ab/attachment-0001.html 


More information about the undertow-dev mailing list