Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (13 sloc) 3.938 kB
<!DOCTYPE html>
<html><head><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>noir.response documentation</title></head><body><div id="header"><h1><a href="index.html">Noir 1.3.0-beta1 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3>Namespaces</h3><ul><li><a href="noir.cookies.html"><span>noir.cookies</span></a></li><li><a href="noir.core.html"><span>noir.core</span></a></li><li><a href="noir.options.html"><span>noir.options</span></a></li><li><a href="noir.request.html"><span>noir.request</span></a></li><li class="current"><a href="noir.response.html"><span>noir.response</span></a></li><li><a href="noir.server.html"><span>noir.server</span></a></li><li><a href="noir.server.handler.html"><span>noir.server.handler</span></a></li><li><a href="noir.session.html"><span>noir.session</span></a></li><li><a href="noir.statuses.html"><span>noir.statuses</span></a></li><li><a href="noir.util.crypt.html"><span>noir.util.crypt</span></a></li><li><a href="noir.util.gae.html"><span>noir.util.gae</span></a></li><li><a href="noir.util.test.html"><span>noir.util.test</span></a></li><li><a href="noir.validation.html"><span>noir.validation</span></a></li></ul></div><div class="sidebar" id="vars"><h3>Public Vars</h3><ul><li><a href="noir.response.html#var-content-type"><span>content-type</span></a></li><li><a href="noir.response.html#var-empty"><span>empty</span></a></li><li><a href="noir.response.html#var-json"><span>json</span></a></li><li><a href="noir.response.html#var-jsonp"><span>jsonp</span></a></li><li><a href="noir.response.html#var-redirect"><span>redirect</span></a></li><li><a href="noir.response.html#var-set-headers"><span>set-headers</span></a></li><li><a href="noir.response.html#var-status"><span>status</span></a></li><li><a href="noir.response.html#var-xml"><span>xml</span></a></li></ul></div><div class="namespace-docs" id="content"><h2>noir.response documentation</h2><pre class="doc">Simple response helpers to change the content type, redirect, or return a canned response
</pre><div class="public" id="var-content-type"><h3>content-type</h3><div class="usage"><code>(content-type ctype content)</code></div><pre class="doc">Wraps the response with the given content type and sets the body to the content.
</pre></div><div class="public" id="var-empty"><h3>empty</h3><div class="usage"><code>(empty)</code></div><pre class="doc">Return a successful, but completely empty response
</pre></div><div class="public" id="var-json"><h3>json</h3><div class="usage"><code>(json content)</code></div><pre class="doc">Wraps the response in the json content type and generates JSON from the content
</pre></div><div class="public" id="var-jsonp"><h3>jsonp</h3><div class="usage"><code>(jsonp func-name content)</code></div><pre class="doc">Generates JSON for the given content and creates a javascript response for calling
func-name with it.</pre></div><div class="public" id="var-redirect"><h3>redirect</h3><div class="usage"><code>(redirect url)</code></div><pre class="doc">A header redirect to a different url
</pre></div><div class="public" id="var-set-headers"><h3>set-headers</h3><div class="usage"><code>(set-headers headers content)</code></div><pre class="doc">Add a map of headers to the given response. Headers must have
string keys:
(set-headers {&quot;x-csrf&quot; csrf}
(common/layout [:p &quot;hey&quot;]))</pre></div><div class="public" id="var-status"><h3>status</h3><div class="usage"><code>(status code content)</code></div><pre class="doc">Wraps the content in the given status code
</pre></div><div class="public" id="var-xml"><h3>xml</h3><div class="usage"><code>(xml content)</code></div><pre class="doc">Wraps the response with the content type for xml and sets the body to the content.
</pre></div></div></body></html>
Jump to Line
Something went wrong with that request. Please try again.