(defn update-servlet-response
"Update the HttpServletResponse using a response map."
[#^HttpServletResponse response, {:keys [status headers body]}]
(when-not response
(throw (Exception. "Null response given.")))
(when status
(.setStatus response status))
(doto response
(set-headers headers)
(set-body body)))
Comments top
No comments for update-servlet-response. Log in to add a comment.