Liberator uses the concept of resources to interact with the client. The resources are simply Ring-compliant handlers that can be used inside your Compojure routes. These resources are defined using the resource and the defresource macros. We need to reference these functions in the liberator-service.handler namespace in order to start working with Liberator.
|||[liberator.core :refer [defresource resource]]))|
Now we can replace our routes definition with a resource, as follows:
|||(ANY "/" request|
Note that we’re using the ANY ...