This commit is contained in:
c-cube 2023-05-23 21:25:40 +00:00
parent ef1e75ad96
commit f978ea649b

View file

@ -3,7 +3,7 @@
<span>?headers:<a href="../Headers/index.html#type-t">Headers.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>code:<a href="../Response_code/index.html#type-t">Response_code.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../index.html#type-byte_stream">byte_stream</a> <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Same as <a href="#val-make_raw"><code>make_raw</code></a> but with a stream body. The body will be sent with the chunked transfer-encoding.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Same as <a href="#val-make_raw"><code>make_raw</code></a> but with a stream body. The body will be sent with the chunked transfer-encoding.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make_void"><a href="#val-make_void" class="anchor"></a><code><span><span class="keyword">val</span> make_void : <span>?headers:<a href="../Headers/index.html#type-t">Headers.t</a> <span class="arrow">&#45;&gt;</span></span> <span>code:int <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Return a response without a body at all.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
<span>?headers:<a href="../Headers/index.html#type-t">Headers.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<a href="#type-body">body</a>, <a href="../Response_code/index.html#type-t">Response_code.t</a> * string)</span> <span class="xref-unresolved">Stdlib</span>.result</span> <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p><code>make r</code> turns a result into a response.</p><ul><li><code>make (Ok body)</code> replies with <code>200</code> and the body.</li><li><code>make (Error (code,msg))</code> replies with the given error code and message as body.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make_string"><a href="#val-make_string" class="anchor"></a><code><span><span class="keyword">val</span> make_string :