update-servlet-response

ring.util.servlet

  • (update-servlet-response response {:keys [status headers body]})
Update the HttpServletResponse using a response map.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source ring/util/servlet.clj:95 top

(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)))
Vars in ring.util.servlet/update-servlet-response: defn doto when when-not
Used in 0 other vars

Comments top

No comments for update-servlet-response. Log in to add a comment.