Akka HTTP provides an elegant DSL for defining the layout of your REST API. This DSL allows you to compose different directives to route and handle your incoming requests. Directives are functions that either let the HTTP request through or reject it depending on its nature. There are over 150 distinct directives to handle the different aspects of the HTTP protocol and parameters of an HTTP request or response. For instance, there are method directives (post, get, put, delete, and so on) or path directives to match a certain path in the URI of the request.
Check all the predefined directives ordered alphabetically in http://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/directives/alphabetically.html.
In this recipe, we see how to easily write a CRUD (Create, Read, Update, Delete) REST API using memory as our storage solution. We will...