I'll give that a shot, thanks!
On Wednesday, May 27, 2015 at 8:12:10 AM UTC-4, James Reeves wrote:
>
> Oh, my apologies. You also need to pass the request map to the render
> method.
>
> (-> (io/resource "public/html/confirm.html")
> (cr/render request)
> (resp/header "Cache-C
Oh, my apologies. You also need to pass the request map to the render
method.
(-> (io/resource "public/html/confirm.html")
(cr/render request)
(resp/header "Cache-Control" "no-cache, no-store"))
You could also write it as:
(-> (resp/resource-response "public/html/confirm.
Hmm. I tried this:
(-> (io/resource "public/html/confirm.html")
(cr/render)
(resp/header "Cache-Control" "no-cache, no-store"))
and got this:
Exception in thread "main" java.lang.IllegalArgumentException: No single
method: render of interface: compojure.response.Rende
Compojure uses the compojure.response/render protocol method to turn values
like URLs into Ring responses. So you could write:
(-> (io/resource "public/html/confirm.html")
(compojure.response/render)
(response/header "X-Foo" "Bar"))
Or you could use some middleware, if the hea