SetAutoHeadcan help you automatically register it:
:seems noising sometimes, take it out when you feels like:
*is in the middle?
/user/?:id, matches both
:intis shortcut for
:stringis shortcut for
*Route.Namemethod give route a name:
There are 5 handlers before this. There are no hard limitation of how many handlers you can have for a route, but you may wonder how does Macaron know when to stop calling next handler?
There are 4 handlers before this, and the last handler never gets chance to call. Why? Because we write response in 5th handler. Thus, once any handler writes anything to the response stream, Macaron will stop calling next handler.