title: How can I get a specific http header in a compojure request
body: <p>I am getting the body and headers from the request like this:</p>
  
  <pre><code>(POST "/api/item" {body :body headers :headers} (create-item body headers))
  </code></pre>
  
  <p>The body is wrapped, so I get a keyword map and I can easily take values from the that:</p>
  
  <pre><code>(def app
      (-&gt; (handler/api app-routes)
          (middleware/wrap-json-body {:keywords? true})
          (middleware/wrap-json-response)))
  </code></pre>
  
  <p>As simple as:</p>
  
  <pre><code>(:item-name body)
  </code></pre>
  
  <p>How can I achieve the same with the headers, or just simply take a specific header value? Do I have to map the headers into a Clojure data structure first?</p>
  
  <p>If I print headers I get something like this:</p>
  
  <pre><code>({host localhost:3000, user-agent Mozilla/5.0})
  </code></pre>