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 O’Reilly online learning.

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