Creating interceptors

The helping-hands.consumer.core namespace defines all the interceptors that are used for the routes of the Consumer microservice. Validation interceptors validate the input parameters and make sure that all the required fields are present in the request. They also prepare the input parameters for the business logic interceptors by creating a :tx-data key with all the required parameters.

Validation interceptors may also perform transformations, such as changing the CSV of the flds parameter to a vector of field names that is required as an input for the entity function defined by ConsumerDB protocol. They terminate the request with a HTTP 400 Bad Request status if the required parameters are not present. They also define ...

Get Microservices with Clojure now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.