Looking at the source for not-modified-since?
, I think the issue is you have no headers in your request map, so it throws a NPE on this expr: (headers "if-modified-since")
. Try changing your request
method like so:
(defn request [resource web-app & params]
(web-app {:request-method :get
:headers {"content-type" "text/plain"} ; added a header
:uri resource
:params (first params)}))
You might also consider using ring-mock
to create requests for testing. It insulates you a little bit from stuff like this.