ocaml-opentelemetry/cohttp/Cohttp/Cookie/index.html
2025-07-23 14:08:20 +00:00

2 lines
4.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Cookie (cohttp.Cohttp.Cookie)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><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">Index</a> &#x00BB; <a href="../../index.html">cohttp</a> &#x00BB; <a href="../index.html">Cohttp</a> &#x00BB; Cookie</nav><header class="odoc-preamble"><h1>Module <code><span>Cohttp.Cookie</span></code></h1><p>Functions for the HTTP Cookie and Set-Cookie header fields. Using the Set-Cookie header field, an HTTP server can pass name/value pairs and associated metadata (called cookies) to a user agent. When the user agent makes subsequent requests to the server, the user agent uses the metadata and other information to determine whether to return the name/value pairs in the Cookie header.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-expiration"><a href="#type-expiration" class="anchor"></a><code><span><span class="keyword">type</span> expiration</span><span> = </span><span>[ </span></code><ol><li id="type-expiration.Session" class="def variant constructor anchored"><a href="#type-expiration.Session" class="anchor"></a><code><span>| </span><span>`Session</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Instructs the user agent to discard the cookie unconditionally when the user agent terminates.</p><span class="comment-delim">*)</span></div></li><li id="type-expiration.Max_age" class="def variant constructor anchored"><a href="#type-expiration.Max_age" class="anchor"></a><code><span>| </span><span>`Max_age <span class="keyword">of</span> int64</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>The value of the Max-Age attribute is delta-seconds, the lifetime of the cookie in seconds, a decimal non-negative integer.</p><span class="comment-delim">*)</span></div></li></ol><code><span> ]</span></code></div><div class="spec-doc"><p>Lifetime of the cookie after which the user agent discards it</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_expiration"><a href="#val-sexp_of_expiration" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_expiration : <span><a href="#type-expiration">expiration</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expiration_of_sexp"><a href="#val-expiration_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> expiration_of_sexp : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-expiration">expiration</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-__expiration_of_sexp__"><a href="#val-__expiration_of_sexp__" class="anchor"></a><code><span><span class="keyword">val</span> __expiration_of_sexp__ : <span><a href="../../../sexplib0/Sexplib0/Sexp/index.html#type-t">Sexplib0.Sexp.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-expiration">expiration</a></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-cookie"><a href="#type-cookie" class="anchor"></a><code><span><span class="keyword">type</span> cookie</span><span> = string * string</span></code></div><div class="spec-doc"><p>A cookie is simply a key/value pair send from the client to the server</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Set_cookie_hdr"><a href="#module-Set_cookie_hdr" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Set_cookie_hdr/index.html">Set_cookie_hdr</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Cookie_hdr"><a href="#module-Cookie_hdr" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Cookie_hdr/index.html">Cookie_hdr</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>