(ns ...
(:require [ring.util.response :refer [ response redirect]))
My original code will look like everything
(-> (response "You are now logged in! communist party time!")
(assoc :session new-session)
(assoc :headers {"Content-Type" "text/html"}))
Which worked fine, but the user still has to move to another location manually.
Trying to use http://ring-clojure.imtqy.com/ring/ring.util.response.html#var-redirect
(-> (redirect requri)
(assoc :session new-session)
(assoc :headers {"Content-Type" "text/html"}))
does nothing (except returning a blank page).
How can I achieve a redirect to a known URI using a ring?
source
share