3. Creating a REST Server in Compojure

In this chapter we will build the first of two REST servers. This is a simple one to do in Compojure. The REST server we build will receive a REST call over http. We will test it using a command line tool, curl.

Assumptions

In this chapter we assume the following:

Image You have Leiningen installed and on your path on the command line.

Image You know how to use curl (whether on a Mac or a PC) and have it on your path.

You understand the concept of http parameters being passed via a GET request URI and via a POST form ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.