This commit is contained in:
c-cube 2024-04-15 16:12:08 +00:00
parent 99a82ba1af
commit cdb25da251

View file

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Head_middleware (tiny_httpd.Tiny_httpd_core.Server.Head_middleware)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Server</a> &#x00BB; Head_middleware</nav><header class="odoc-preamble"><h1>Module <code><span>Server.Head_middleware</span></code></h1><p>A middleware that only considers the request's head+headers.</p><p>These middlewares are simpler than full <a href="../Middleware/index.html#type-t"><code>Middleware.t</code></a> and work in more contexts.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.handle" class="def record field anchored"><a href="#type-t.handle" class="anchor"></a><code><span>handle : 'a. <span><span><span class="type-var">'a</span> <a href="../../Request/index.html#type-t">Request.t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="../../Request/index.html#type-t">Request.t</a></span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A handler that takes the request, without its body, and possibly modifies it.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_middleware"><a href="#val-to_middleware" class="anchor"></a><code><span><span class="keyword">val</span> to_middleware : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Middleware/index.html#type-t">Middleware.t</a></span></code></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Head_middleware (tiny_httpd.Tiny_httpd_core.Server.Head_middleware)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_core</a> &#x00BB; <a href="../index.html">Server</a> &#x00BB; Head_middleware</nav><header class="odoc-preamble"><h1>Module <code><span>Server.Head_middleware</span></code></h1><p>A middleware that only considers the request's head+headers.</p><p>These middlewares are simpler than full <a href="../Middleware/index.html#type-t"><code>Middleware.t</code></a> and work in more contexts.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.handle" class="def record field anchored"><a href="#type-t.handle" class="anchor"></a><code><span>handle : 'a. <span><span><span class="type-var">'a</span> <a href="../../Request/index.html#type-t">Request.t</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="../../Request/index.html#type-t">Request.t</a></span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A handler that takes the request, without its body, and possibly modifies it.</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-trivial"><a href="#val-trivial" class="anchor"></a><code><span><span class="keyword">val</span> trivial : <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Pass through</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_middleware"><a href="#val-to_middleware" class="anchor"></a><code><span><span class="keyword">val</span> to_middleware : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Middleware/index.html#type-t">Middleware.t</a></span></code></div></div></div></body></html>