You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<html><head><metacharset="UTF-8" /><title>Ring-Mock 0.5.0</title><linkrel="stylesheet" type="text/css" href="css/default.css" /><linkrel="stylesheet" type="text/css" href="css/highlight.css" /><scripttype="text/javascript" src="js/highlight.min.js"></script><scripttype="text/javascript" src="js/jquery.min.js"></script><scripttype="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divid="header"><h2>Generated by <ahref="https://github.com/weavejester/codox">Codox</a></h2><h1><ahref="index.html"><spanclass="project-title"><spanclass="project-name">Ring-Mock</span><spanclass="project-version">0.5.0</span></span></a></h1></div><divclass="sidebar primary"><h3class="no-link"><spanclass="inner">Project</span></h3><ulclass="index-link"><liclass="depth-1 current"><ahref="index.html"><divclass="inner">Index</div></a></li></ul><h3class="no-link"><spanclass="inner">Namespaces</span></h3><ul><liclass="depth-1 "><ahref="ring.mock.request.html"><divclass="inner"><span>ring.mock.request</span></div></a></li></ul></div><divclass="namespace-index" id="content"><h1><spanclass="project-title"><spanclass="project-name">Ring-Mock</span><spanclass="project-version">0.5.0</span></span></h1><h5class="license">Released under the <ahref="http://opensource.org/licenses/MIT">MIT License</a></h5><divclass="doc"><p>A library for creating mock Ring request maps.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><preclass="deps">[ring/ring-mock "0.5.0"]</pre><h2>Namespaces</h2><divclass="namespace"><h3><ahref="ring.mock.request.html">ring.mock.request</a></h3><divclass="doc"><preclass="plaintext">Functions to create mock request maps.</pre></div><divclass="index"><p>Public variables and functions:</p><ul><li><ahref="ring.mock.request.html#var-body">body</a></li><li><ahref="ring.mock.request.html#var-content-length">content-length</a></li><li><ahref="ring.mock.request.html#var-content-type">content-type</a></li><li><ahref="ring.mock.request.html#var-cookie">cookie</a></li><li><ahref="ring.mock.request.html#var-default-port">default-port</a></li><li><ahref="ring.mock.request.html#var-header">header</a></li><li><ahref="ring.mock.request.html#var-json-body">json-body</a></li><li><ahref="ring.mock.request.html#var-query-string">query-string</a></li><li><ahref="ring.mock.request.html#var-request">request</a></li></ul></div></div></div></body></html>
3
+
<html><head><metacharset="UTF-8" /><title>Ring-Mock 0.6.0</title><linkrel="stylesheet" type="text/css" href="css/default.css" /><linkrel="stylesheet" type="text/css" href="css/highlight.css" /><scripttype="text/javascript" src="js/highlight.min.js"></script><scripttype="text/javascript" src="js/jquery.min.js"></script><scripttype="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divid="header"><h2>Generated by <ahref="https://github.com/weavejester/codox">Codox</a></h2><h1><ahref="index.html"><spanclass="project-title"><spanclass="project-name">Ring-Mock</span><spanclass="project-version">0.6.0</span></span></a></h1></div><divclass="sidebar primary"><h3class="no-link"><spanclass="inner">Project</span></h3><ulclass="index-link"><liclass="depth-1 current"><ahref="index.html"><divclass="inner">Index</div></a></li></ul><h3class="no-link"><spanclass="inner">Namespaces</span></h3><ul><liclass="depth-1 "><ahref="ring.mock.request.html"><divclass="inner"><span>ring.mock.request</span></div></a></li></ul></div><divclass="namespace-index" id="content"><h1><spanclass="project-title"><spanclass="project-name">Ring-Mock</span><spanclass="project-version">0.6.0</span></span></h1><h5class="license">Released under the <ahref="http://opensource.org/licenses/MIT">MIT License</a></h5><divclass="doc"><p>A library for creating mock Ring request maps.</p></div><h2>Installation</h2><p>To install, add the following dependency to your project or build file:</p><preclass="deps">[ring/ring-mock "0.6.0"]</pre><h2>Namespaces</h2><divclass="namespace"><h3><ahref="ring.mock.request.html">ring.mock.request</a></h3><divclass="doc"><preclass="plaintext">Functions to create mock request maps.</pre></div><divclass="index"><p>Public variables and functions:</p><ul><li><ahref="ring.mock.request.html#var-add-multipart-part">add-multipart-part</a></li><li><ahref="ring.mock.request.html#var-body">body</a></li><li><ahref="ring.mock.request.html#var-content-length">content-length</a></li><li><ahref="ring.mock.request.html#var-content-type">content-type</a></li><li><ahref="ring.mock.request.html#var-cookie">cookie</a></li><li><ahref="ring.mock.request.html#var-default-port">default-port</a></li><li><ahref="ring.mock.request.html#var-header">header</a></li><li><ahref="ring.mock.request.html#var-json-body">json-body</a></li><li><ahref="ring.mock.request.html#var-multipart-body">multipart-body</a></li><li><ahref="ring.mock.request.html#var-multipart-entity">multipart-entity</a></li><li><ahref="ring.mock.request.html#var-query-string">query-string</a></li><li><ahref="ring.mock.request.html#var-request">request</a></li></ul></div></div></div></body></html>
</pre></div><divclass="public anchor" id="var-body"><h3>body</h3><h4class="type">multimethod</h4><divclass="usage"><code>(body request body-value)</code></div><divclass="doc"><preclass="plaintext">Set the body of the request. The supplied body value can be a string or
5
-
a map of parameters to be url-encoded.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L68">view source</a></div></div><divclass="public anchor" id="var-content-length"><h3>content-length</h3><divclass="usage"><code>(content-length request length)</code></div><divclass="doc"><preclass="plaintext">Set the content length of the request map.
6
-
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L37">view source</a></div></div><divclass="public anchor" id="var-content-type"><h3>content-type</h3><divclass="usage"><code>(content-type request mime-type)</code></div><divclass="doc"><preclass="plaintext">Set the content type of the request map.
7
-
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L30">view source</a></div></div><divclass="public anchor" id="var-cookie"><h3>cookie</h3><divclass="usage"><code>(cookie request cookie-name value)</code></div><divclass="doc"><preclass="plaintext">Add a cookie to the request headers map
8
-
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L19">view source</a></div></div><divclass="public anchor" id="var-default-port"><h3>default-port</h3><divclass="usage"></div><divclass="doc"><preclass="plaintext">A map of the default ports for a scheme.
9
-
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L98">view source</a></div></div><divclass="public anchor" id="var-header"><h3>header</h3><divclass="usage"><code>(header request header value)</code></div><divclass="doc"><preclass="plaintext">Add a HTTP header to the request map.
10
-
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L13">view source</a></div></div><divclass="public anchor" id="var-json-body"><h3>json-body</h3><divclass="usage"><code>(json-body request body-value)</code></div><divclass="doc"><preclass="plaintext">Set the body of the request to a JSON structure. The supplied body value
11
-
should be a map of parameters to be converted to JSON.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L90">view source</a></div></div><divclass="public anchor" id="var-query-string"><h3>query-string</h3><divclass="usage"><code>(query-string request params)</code></div><divclass="doc"><preclass="plaintext">Set the query string of the request to a string or a map of parameters.
12
-
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L60">view source</a></div></div><divclass="public anchor" id="var-request"><h3>request</h3><divclass="usage"><code>(request method uri)</code><code>(request method uri params)</code></div><divclass="doc"><preclass="plaintext">Create a minimal valid request map from a HTTP method keyword, a string
</pre></div><divclass="public anchor" id="var-add-multipart-part"><h3>add-multipart-part</h3><divclass="usage"><code>(add-multipart-part builder k v)</code></div><divclass="doc"><preclass="plaintext"></pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L109">view source</a></div></div><divclass="public anchor" id="var-body"><h3>body</h3><h4class="type">multimethod</h4><divclass="usage"><code>(body request body-value)</code></div><divclass="doc"><preclass="plaintext">Set the body of the request. The supplied body value can be a string or
5
+
a map of parameters to be url-encoded.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L73">view source</a></div></div><divclass="public anchor" id="var-content-length"><h3>content-length</h3><divclass="usage"><code>(content-length request length)</code></div><divclass="doc"><preclass="plaintext">Set the content length of the request map.
6
+
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L42">view source</a></div></div><divclass="public anchor" id="var-content-type"><h3>content-type</h3><divclass="usage"><code>(content-type request mime-type)</code></div><divclass="doc"><preclass="plaintext">Set the content type of the request map.
7
+
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L35">view source</a></div></div><divclass="public anchor" id="var-cookie"><h3>cookie</h3><divclass="usage"><code>(cookie request cookie-name value)</code></div><divclass="doc"><preclass="plaintext">Add a cookie to the request headers map
8
+
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L24">view source</a></div></div><divclass="public anchor" id="var-default-port"><h3>default-port</h3><divclass="usage"></div><divclass="doc"><preclass="plaintext">A map of the default ports for a scheme.
9
+
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L154">view source</a></div></div><divclass="public anchor" id="var-header"><h3>header</h3><divclass="usage"><code>(header request header value)</code></div><divclass="doc"><preclass="plaintext">Add a HTTP header to the request map.
10
+
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L18">view source</a></div></div><divclass="public anchor" id="var-json-body"><h3>json-body</h3><divclass="usage"><code>(json-body request body-value)</code></div><divclass="doc"><preclass="plaintext">Set the body of the request to a JSON structure. The supplied body value
11
+
should be a map of parameters to be converted to JSON.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L95">view source</a></div></div><divclass="public anchor" id="var-multipart-body"><h3>multipart-body</h3><divclass="usage"><code>(multipart-body request params)</code></div><divclass="doc"><preclass="plaintext">Set the body of the request to a map of parameters encoded as a multipart
12
+
form. The parameters are supplied as a map. The keys should be keywords or
13
+
strings. The values should be maps that contain the following keys:
14
+
15
+
:value - a string, byte array, File or InputStream
16
+
:filename - the name of the file the value came from (optional)
17
+
:content-type - the content type of the value (optional)
18
+
19
+
The value may also be a string, byte array, File or InputStream instead of a
20
+
map. In that case, it will be treated as if it were a map with a single :value
21
+
key.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L132">view source</a></div></div><divclass="public anchor" id="var-multipart-entity"><h3>multipart-entity</h3><divclass="usage"><code>(multipart-entity params)</code></div><divclass="doc"><preclass="plaintext"></pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L125">view source</a></div></div><divclass="public anchor" id="var-query-string"><h3>query-string</h3><divclass="usage"><code>(query-string request params)</code></div><divclass="doc"><preclass="plaintext">Set the query string of the request to a string or a map of parameters.
22
+
</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L65">view source</a></div></div><divclass="public anchor" id="var-request"><h3>request</h3><divclass="usage"><code>(request method uri)</code><code>(request method uri params)</code></div><divclass="doc"><preclass="plaintext">Create a minimal valid request map from a HTTP method keyword, a string
13
23
containing a URI, and an optional map of parameters that will be added to
14
24
the query string of the URI. The URI can be relative or absolute. Relative
15
-
URIs are assumed to go to <ahref="http://localhost">http://localhost</a>.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.5.0/src/ring/mock/request.clj#L103">view source</a></div></div></div></body></html>
25
+
URIs are assumed to go to <ahref="http://localhost">http://localhost</a>.</pre></div><divclass="src-link"><ahref="https://github.com/ring-clojure/ring-mock/blob/0.6.0/src/ring/mock/request.clj#L159">view source</a></div></div></div></body></html>
0 commit comments