concept API controller in category scalatra

appears as: n API controller, API controller
Scalatra in Action

This is an excerpt from Manning's book Scalatra in Action.

Let’s add the API controller. Create a new file called ApiController.scala at the same level as HackersController.scala. Because you won’t have a user interface, there’s no need to inherit from HackerTrackerStack, which has references to ScalateSupport and FlashMapSupport. Instead, you can inherit directly from ScalatraServlet (which gives you the HTTP DSL) and MethodOverride (which allows you to support HTTP’s PUT and DELETE operations in addition to GET and POST). Your controller should look like the following listing.