noir.response documentation

Simple response helpers to change the content type, redirect, or return a canned response

content-type

(content-type ctype content)
Wraps the response with the given content type and sets the body to the content.

empty

(empty)
Return a successful, but completely empty response

json

(json content)
Wraps the response in the json content type and generates JSON from the content

jsonp

(jsonp func-name content)
Generates JSON for the given content and creates a javascript response for calling
func-name with it.

redirect

(redirect url)
A header redirect to a different url

set-headers

(set-headers headers content)
Add a map of headers to the given response. Headers must have
string keys:

(set-headers {"x-csrf" csrf}
  (common/layout [:p "hey"]))

status

(status code content)
Wraps the content in the given status code

xml

(xml content)
Wraps the response with the content type for xml and sets the body to the content.