Files
Nim/cgi.html
github-actions[bot] ef3d9e7b38 Deploy to GitHub pages
2025-12-28 15:55:52 +00:00

991 lines
90 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>std/cgi</title>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
<!-- JS -->
<script type="text/javascript" src="dochack.js?v=2.3.1"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">std/cgi</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple-boot">
<li><a href="manual.html">Manual</a></li>
<li><a href="lib.html">Standard library</a></li>
<li> <a id="indexLink" href="theindex.html">Index</a></li>
<li><a href="compiler/theindex.html">Compiler docs</a></li>
<li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
<li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput"
oninput="search()" />
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#CgiError" title="CgiError = object of IOError">CgiError</a></li>
<li><a class="reference" href="#RequestMethod" title="RequestMethod = enum
methodNone, ## no REQUEST_METHOD environment variable
methodPost, ## query uses the POST method
methodGet ## query uses the GET method">RequestMethod</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">cgiError
<li><a class="reference" href="#cgiError%2Cstring" title="cgiError(msg: string)">cgiError(msg: string)</a></li>
</ul>
<ul class="simple nested-toc-section">existsCookie
<li><a class="reference" href="#existsCookie%2Cstring" title="existsCookie(name: string): bool">existsCookie(name: string): bool</a></li>
</ul>
<ul class="simple nested-toc-section">getContentLength
<li><a class="reference" href="#getContentLength" title="getContentLength(): string">getContentLength(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getContentType
<li><a class="reference" href="#getContentType" title="getContentType(): string">getContentType(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getCookie
<li><a class="reference" href="#getCookie%2Cstring" title="getCookie(name: string): string">getCookie(name: string): string</a></li>
</ul>
<ul class="simple nested-toc-section">getDocumentRoot
<li><a class="reference" href="#getDocumentRoot" title="getDocumentRoot(): string">getDocumentRoot(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getGatewayInterface
<li><a class="reference" href="#getGatewayInterface" title="getGatewayInterface(): string">getGatewayInterface(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpAccept
<li><a class="reference" href="#getHttpAccept" title="getHttpAccept(): string">getHttpAccept(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpAcceptCharset
<li><a class="reference" href="#getHttpAcceptCharset" title="getHttpAcceptCharset(): string">getHttpAcceptCharset(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpAcceptEncoding
<li><a class="reference" href="#getHttpAcceptEncoding" title="getHttpAcceptEncoding(): string">getHttpAcceptEncoding(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpAcceptLanguage
<li><a class="reference" href="#getHttpAcceptLanguage" title="getHttpAcceptLanguage(): string">getHttpAcceptLanguage(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpConnection
<li><a class="reference" href="#getHttpConnection" title="getHttpConnection(): string">getHttpConnection(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpCookie
<li><a class="reference" href="#getHttpCookie" title="getHttpCookie(): string">getHttpCookie(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpHost
<li><a class="reference" href="#getHttpHost" title="getHttpHost(): string">getHttpHost(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpReferer
<li><a class="reference" href="#getHttpReferer" title="getHttpReferer(): string">getHttpReferer(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getHttpUserAgent
<li><a class="reference" href="#getHttpUserAgent" title="getHttpUserAgent(): string">getHttpUserAgent(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getPathInfo
<li><a class="reference" href="#getPathInfo" title="getPathInfo(): string">getPathInfo(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getPathTranslated
<li><a class="reference" href="#getPathTranslated" title="getPathTranslated(): string">getPathTranslated(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getQueryString
<li><a class="reference" href="#getQueryString" title="getQueryString(): string">getQueryString(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRemoteAddr
<li><a class="reference" href="#getRemoteAddr" title="getRemoteAddr(): string">getRemoteAddr(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRemoteHost
<li><a class="reference" href="#getRemoteHost" title="getRemoteHost(): string">getRemoteHost(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRemoteIdent
<li><a class="reference" href="#getRemoteIdent" title="getRemoteIdent(): string">getRemoteIdent(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRemotePort
<li><a class="reference" href="#getRemotePort" title="getRemotePort(): string">getRemotePort(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRemoteUser
<li><a class="reference" href="#getRemoteUser" title="getRemoteUser(): string">getRemoteUser(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRequestMethod
<li><a class="reference" href="#getRequestMethod" title="getRequestMethod(): string">getRequestMethod(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getRequestURI
<li><a class="reference" href="#getRequestURI" title="getRequestURI(): string">getRequestURI(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getScriptFilename
<li><a class="reference" href="#getScriptFilename" title="getScriptFilename(): string">getScriptFilename(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getScriptName
<li><a class="reference" href="#getScriptName" title="getScriptName(): string">getScriptName(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerAddr
<li><a class="reference" href="#getServerAddr" title="getServerAddr(): string">getServerAddr(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerAdmin
<li><a class="reference" href="#getServerAdmin" title="getServerAdmin(): string">getServerAdmin(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerName
<li><a class="reference" href="#getServerName" title="getServerName(): string">getServerName(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerPort
<li><a class="reference" href="#getServerPort" title="getServerPort(): string">getServerPort(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerProtocol
<li><a class="reference" href="#getServerProtocol" title="getServerProtocol(): string">getServerProtocol(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerSignature
<li><a class="reference" href="#getServerSignature" title="getServerSignature(): string">getServerSignature(): string</a></li>
</ul>
<ul class="simple nested-toc-section">getServerSoftware
<li><a class="reference" href="#getServerSoftware" title="getServerSoftware(): string">getServerSoftware(): string</a></li>
</ul>
<ul class="simple nested-toc-section">readData
<li><a class="reference" href="#readData%2Cset%5BRequestMethod%5D" title="readData(allowedMethods: set[RequestMethod] = {methodNone, methodPost, methodGet}): StringTableRef">readData(allowedMethods: set[RequestMethod] = {methodNone, methodPost, methodGet}): StringTableRef</a></li>
<li><a class="reference" href="#readData%2Cstring" title="readData(data: string): StringTableRef">readData(data: string): StringTableRef</a></li>
</ul>
<ul class="simple nested-toc-section">setCookie
<li><a class="reference" href="#setCookie%2Cstring%2Cstring" title="setCookie(name, value: string)">setCookie(name, value: string)</a></li>
</ul>
<ul class="simple nested-toc-section">setStackTraceStdout
<li><a class="reference" href="#setStackTraceStdout" title="setStackTraceStdout()">setStackTraceStdout()</a></li>
</ul>
<ul class="simple nested-toc-section">setTestData
<li><a class="reference" href="#setTestData%2Cvarargs%5Bstring%5D" title="setTestData(keysvalues: varargs[string])">setTestData(keysvalues: varargs[string])</a></li>
</ul>
<ul class="simple nested-toc-section">validateData
<li><a class="reference" href="#validateData%2CStringTableRef%2Cvarargs%5Bstring%5D" title="validateData(data: StringTableRef; validKeys: varargs[string])">validateData(data: StringTableRef; validKeys: varargs[string])</a></li>
</ul>
<ul class="simple nested-toc-section">writeContentType
<li><a class="reference" href="#writeContentType" title="writeContentType()">writeContentType()</a></li>
</ul>
<ul class="simple nested-toc-section">writeErrorMessage
<li><a class="reference" href="#writeErrorMessage%2Cstring" title="writeErrorMessage(data: string)">writeErrorMessage(data: string)</a></li>
</ul>
<ul class="simple nested-toc-section">xmlEncode
<li><a class="reference" href="#xmlEncode%2Cstring" title="xmlEncode(s: string): string">xmlEncode(s: string): string</a></li>
</ul>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#15" id="65">Iterators</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">decodeData
<li><a class="reference" href="#decodeData.i%2Cset%5BRequestMethod%5D" title="decodeData(allowedMethods: set[RequestMethod] = {methodNone, methodPost,
methodGet}): tuple[key, value: string]">decodeData(allowedMethods: set[RequestMethod] = {methodNone, methodPost,
methodGet}): tuple[key, value: string]</a></li>
<li><a class="reference" href="#decodeData.i%2Cstring" title="decodeData(data: string): tuple[key, value: string]">decodeData(data: string): tuple[key, value: string]</a></li>
</ul>
</ul>
</details>
</li>
<li>
<a class="reference reference-toplevel" href="#19" id="69">Exports</a>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc"><p>This module implements helper procs for CGI applications. Example:</p>
<p><pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Punctuation">[</span><span class="Identifier">strtabs</span><span class="Punctuation">,</span> <span class="Identifier">cgi</span><span class="Punctuation">]</span>
<span class="Comment"># Fill the values when debugging:</span>
<span class="Keyword">when</span> <span class="Identifier">debug</span><span class="Punctuation">:</span>
<span class="Identifier">setTestData</span><span class="Punctuation">(</span><span class="StringLit">&quot;name&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;Klaus&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;password&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;123456&quot;</span><span class="Punctuation">)</span>
<span class="Comment"># read the data into `myData`</span>
<span class="Keyword">var</span> <span class="Identifier">myData</span> <span class="Operator">=</span> <span class="Identifier">readData</span><span class="Punctuation">(</span><span class="Punctuation">)</span>
<span class="Comment"># check that the data's variable names are &quot;name&quot; or &quot;password&quot;</span>
<span class="Identifier">validateData</span><span class="Punctuation">(</span><span class="Identifier">myData</span><span class="Punctuation">,</span> <span class="StringLit">&quot;name&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;password&quot;</span><span class="Punctuation">)</span>
<span class="Comment"># start generating content:</span>
<span class="Identifier">writeContentType</span><span class="Punctuation">(</span><span class="Punctuation">)</span>
<span class="Comment"># generate content:</span>
<span class="Identifier">write</span><span class="Punctuation">(</span><span class="Identifier">stdout</span><span class="Punctuation">,</span> <span class="StringLit">&quot;&lt;!DOCTYPE HTML PUBLIC </span><span class="EscapeSequence">\&quot;</span><span class="StringLit">-//W3C//DTD HTML 4.01//EN</span><span class="EscapeSequence">\&quot;</span><span class="StringLit">&gt;</span><span class="EscapeSequence">\n</span><span class="StringLit">&quot;</span><span class="Punctuation">)</span>
<span class="Identifier">write</span><span class="Punctuation">(</span><span class="Identifier">stdout</span><span class="Punctuation">,</span> <span class="StringLit">&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Test&lt;/title&gt;&lt;/head&gt;&lt;body&gt;</span><span class="EscapeSequence">\n</span><span class="StringLit">&quot;</span><span class="Punctuation">)</span>
<span class="Identifier">writeLine</span><span class="Punctuation">(</span><span class="Identifier">stdout</span><span class="Punctuation">,</span> <span class="StringLit">&quot;your name: &quot;</span> <span class="Operator">&amp;</span> <span class="Identifier">myData</span><span class="Punctuation">[</span><span class="StringLit">&quot;name&quot;</span><span class="Punctuation">]</span><span class="Punctuation">)</span>
<span class="Identifier">writeLine</span><span class="Punctuation">(</span><span class="Identifier">stdout</span><span class="Punctuation">,</span> <span class="StringLit">&quot;your password: &quot;</span> <span class="Operator">&amp;</span> <span class="Identifier">myData</span><span class="Punctuation">[</span><span class="StringLit">&quot;password&quot;</span><span class="Punctuation">]</span><span class="Punctuation">)</span>
<span class="Identifier">writeLine</span><span class="Punctuation">(</span><span class="Identifier">stdout</span><span class="Punctuation">,</span> <span class="StringLit">&quot;&lt;/body&gt;&lt;/html&gt;&quot;</span><span class="Punctuation">)</span></pre></p>
</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="os.html">os</a>, <a class="reference external" href="strtabs.html">strtabs</a>, <a class="reference external" href="cookies.html">cookies</a>, <a class="reference external" href="uri.html">uri</a>, <a class="reference external" href="syncio.html">syncio</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="CgiError">
<dt><pre><a href="cgi.html#CgiError"><span class="Identifier">CgiError</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="exceptions.html#IOError"><span class="Identifier">IOError</span></a></pre></dt>
<dd>
Exception that is raised if a CGI error occurs.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L58" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L58" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="RequestMethod">
<dt><pre><a href="cgi.html#RequestMethod"><span class="Identifier">RequestMethod</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">methodNone</span><span class="Other">,</span> <span class="Comment">## no REQUEST_METHOD environment variable</span>
<span class="Identifier">methodPost</span><span class="Other">,</span> <span class="Comment">## query uses the POST method</span>
<span class="Identifier">methodGet</span> <span class="Comment">## query uses the GET method</span></pre></dt>
<dd>
The used request method.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L59" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L59" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="cgiError-procs-all">
<div id="cgiError,string">
<dt><pre><span class="Keyword">proc</span> <a href="#cgiError%2Cstring"><span class="Identifier">cgiError</span></a><span class="Other">(</span><span class="Identifier">msg</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span class="Identifier">noreturn</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">CgiError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Raises a <tt class="docutils literal"><span class="pre"><span class="Identifier">CgiError</span></span></tt> exception with message <tt class="docutils literal"><span class="pre"><span class="Identifier">msg</span></span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L64" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L64" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="existsCookie-procs-all">
<div id="existsCookie,string">
<dt><pre><span class="Keyword">proc</span> <a href="#existsCookie%2Cstring"><span class="Identifier">existsCookie</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Checks if a cookie of <tt class="docutils literal"><span class="pre"><span class="Identifier">name</span></span></tt> exists.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L317" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L317" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getContentLength-procs-all">
<div id="getContentLength">
<dt><pre><span class="Keyword">proc</span> <a href="#getContentLength"><span class="Identifier">getContentLength</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">CONTENT_LENGTH</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L125" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L125" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getContentType-procs-all">
<div id="getContentType">
<dt><pre><span class="Keyword">proc</span> <a href="#getContentType"><span class="Identifier">getContentType</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">CONTENT_TYPE</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L129" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L129" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getCookie-procs-all">
<div id="getCookie,string">
<dt><pre><span class="Keyword">proc</span> <a href="#getCookie%2Cstring"><span class="Identifier">getCookie</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Gets a cookie. If no cookie of <tt class="docutils literal"><span class="pre"><span class="Identifier">name</span></span></tt> exists, &quot;&quot; is returned.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L312" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L312" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getDocumentRoot-procs-all">
<div id="getDocumentRoot">
<dt><pre><span class="Keyword">proc</span> <a href="#getDocumentRoot"><span class="Identifier">getDocumentRoot</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">DOCUMENT_ROOT</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L133" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L133" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getGatewayInterface-procs-all">
<div id="getGatewayInterface">
<dt><pre><span class="Keyword">proc</span> <a href="#getGatewayInterface"><span class="Identifier">getGatewayInterface</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">GATEWAY_INTERFACE</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L137" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L137" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpAccept-procs-all">
<div id="getHttpAccept">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpAccept"><span class="Identifier">getHttpAccept</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_ACCEPT</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L141" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L141" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpAcceptCharset-procs-all">
<div id="getHttpAcceptCharset">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpAcceptCharset"><span class="Identifier">getHttpAcceptCharset</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_ACCEPT_CHARSET</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L145" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L145" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpAcceptEncoding-procs-all">
<div id="getHttpAcceptEncoding">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpAcceptEncoding"><span class="Identifier">getHttpAcceptEncoding</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_ACCEPT_ENCODING</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L149" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L149" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpAcceptLanguage-procs-all">
<div id="getHttpAcceptLanguage">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpAcceptLanguage"><span class="Identifier">getHttpAcceptLanguage</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_ACCEPT_LANGUAGE</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L153" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L153" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpConnection-procs-all">
<div id="getHttpConnection">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpConnection"><span class="Identifier">getHttpConnection</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_CONNECTION</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L157" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L157" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpCookie-procs-all">
<div id="getHttpCookie">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpCookie"><span class="Identifier">getHttpCookie</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_COOKIE</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L161" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L161" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpHost-procs-all">
<div id="getHttpHost">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpHost"><span class="Identifier">getHttpHost</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_HOST</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L165" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L165" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpReferer-procs-all">
<div id="getHttpReferer">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpReferer"><span class="Identifier">getHttpReferer</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_REFERER</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L169" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L169" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getHttpUserAgent-procs-all">
<div id="getHttpUserAgent">
<dt><pre><span class="Keyword">proc</span> <a href="#getHttpUserAgent"><span class="Identifier">getHttpUserAgent</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">HTTP_USER_AGENT</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L173" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L173" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getPathInfo-procs-all">
<div id="getPathInfo">
<dt><pre><span class="Keyword">proc</span> <a href="#getPathInfo"><span class="Identifier">getPathInfo</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">PATH_INFO</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L177" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L177" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getPathTranslated-procs-all">
<div id="getPathTranslated">
<dt><pre><span class="Keyword">proc</span> <a href="#getPathTranslated"><span class="Identifier">getPathTranslated</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">PATH_TRANSLATED</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L181" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L181" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getQueryString-procs-all">
<div id="getQueryString">
<dt><pre><span class="Keyword">proc</span> <a href="#getQueryString"><span class="Identifier">getQueryString</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">QUERY_STRING</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L185" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L185" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRemoteAddr-procs-all">
<div id="getRemoteAddr">
<dt><pre><span class="Keyword">proc</span> <a href="#getRemoteAddr"><span class="Identifier">getRemoteAddr</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REMOTE_ADDR</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L189" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L189" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRemoteHost-procs-all">
<div id="getRemoteHost">
<dt><pre><span class="Keyword">proc</span> <a href="#getRemoteHost"><span class="Identifier">getRemoteHost</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REMOTE_HOST</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L193" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L193" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRemoteIdent-procs-all">
<div id="getRemoteIdent">
<dt><pre><span class="Keyword">proc</span> <a href="#getRemoteIdent"><span class="Identifier">getRemoteIdent</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REMOTE_IDENT</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L197" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L197" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRemotePort-procs-all">
<div id="getRemotePort">
<dt><pre><span class="Keyword">proc</span> <a href="#getRemotePort"><span class="Identifier">getRemotePort</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REMOTE_PORT</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L201" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L201" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRemoteUser-procs-all">
<div id="getRemoteUser">
<dt><pre><span class="Keyword">proc</span> <a href="#getRemoteUser"><span class="Identifier">getRemoteUser</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REMOTE_USER</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L205" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L205" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRequestMethod-procs-all">
<div id="getRequestMethod">
<dt><pre><span class="Keyword">proc</span> <a href="#getRequestMethod"><span class="Identifier">getRequestMethod</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REQUEST_METHOD</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L209" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L209" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getRequestURI-procs-all">
<div id="getRequestURI">
<dt><pre><span class="Keyword">proc</span> <a href="#getRequestURI"><span class="Identifier">getRequestURI</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">REQUEST_URI</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L213" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L213" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getScriptFilename-procs-all">
<div id="getScriptFilename">
<dt><pre><span class="Keyword">proc</span> <a href="#getScriptFilename"><span class="Identifier">getScriptFilename</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SCRIPT_FILENAME</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L217" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L217" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getScriptName-procs-all">
<div id="getScriptName">
<dt><pre><span class="Keyword">proc</span> <a href="#getScriptName"><span class="Identifier">getScriptName</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SCRIPT_NAME</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L221" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L221" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerAddr-procs-all">
<div id="getServerAddr">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerAddr"><span class="Identifier">getServerAddr</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_ADDR</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L225" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L225" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerAdmin-procs-all">
<div id="getServerAdmin">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerAdmin"><span class="Identifier">getServerAdmin</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_ADMIN</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L229" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L229" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerName-procs-all">
<div id="getServerName">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerName"><span class="Identifier">getServerName</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_NAME</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L233" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L233" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerPort-procs-all">
<div id="getServerPort">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerPort"><span class="Identifier">getServerPort</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_PORT</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L237" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L237" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerProtocol-procs-all">
<div id="getServerProtocol">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerProtocol"><span class="Identifier">getServerProtocol</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_PROTOCOL</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L241" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L241" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerSignature-procs-all">
<div id="getServerSignature">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerSignature"><span class="Identifier">getServerSignature</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_SIGNATURE</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L245" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L245" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getServerSoftware-procs-all">
<div id="getServerSoftware">
<dt><pre><span class="Keyword">proc</span> <a href="#getServerSoftware"><span class="Identifier">getServerSoftware</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns contents of the <tt class="docutils literal"><span class="pre"><span class="Identifier">SERVER_SOFTWARE</span></span></tt> environment variable.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L249" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L249" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="readData-procs-all">
<div id="readData,set[RequestMethod]">
<dt><pre><span class="Keyword">proc</span> <a href="#readData%2Cset%5BRequestMethod%5D"><span class="Identifier">readData</span></a><span class="Other">(</span><span class="Identifier">allowedMethods</span><span class="Other">:</span> <a href="system.html#set"><span class="Identifier">set</span></a><span class="Other">[</span><a href="cgi.html#RequestMethod"><span class="Identifier">RequestMethod</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Other">{</span><span class="Identifier">methodNone</span><span class="Other">,</span> <span class="Identifier">methodPost</span><span class="Other">,</span>
<span class="Identifier">methodGet</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <a href="strtabs.html#StringTableRef"><span class="Identifier">StringTableRef</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">CgiError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Reads CGI data. If the client does not use a method listed in the <tt class="docutils literal"><span class="pre"><span class="Identifier">allowedMethods</span></span></tt> set, a <tt class="docutils literal"><span class="pre"><span class="Identifier">CgiError</span></span></tt> exception is raised.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L104" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L104" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="readData,string">
<dt><pre><span class="Keyword">proc</span> <a href="#readData%2Cstring"><span class="Identifier">readData</span></a><span class="Other">(</span><span class="Identifier">data</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="strtabs.html#StringTableRef"><span class="Identifier">StringTableRef</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Reads CGI data from a string.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L112" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L112" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="setCookie-procs-all">
<div id="setCookie,string,string">
<dt><pre><span class="Keyword">proc</span> <a href="#setCookie%2Cstring%2Cstring"><span class="Identifier">setCookie</span></a><span class="Other">(</span><span class="Identifier">name</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Sets a cookie.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L305" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L305" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="setStackTraceStdout-procs-all">
<div id="setStackTraceStdout">
<dt><pre><span class="Keyword">proc</span> <a href="#setStackTraceStdout"><span class="Identifier">setStackTraceStdout</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Makes Nim output stacktraces to stdout, instead of server log.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L301" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L301" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="setTestData-procs-all">
<div id="setTestData,varargs[string]">
<dt><pre><span class="Keyword">proc</span> <a href="#setTestData%2Cvarargs%5Bstring%5D"><span class="Identifier">setTestData</span></a><span class="Other">(</span><span class="Identifier">keysvalues</span><span class="Other">:</span> <a href="system.html#varargs"><span class="Identifier">varargs</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">OSError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Fills the appropriate environment variables to test your CGI application. This can only simulate the 'GET' request method. <tt class="docutils literal"><span class="pre"><span class="Identifier">keysvalues</span></span></tt> should provide embedded (name, value)-pairs. Example:</p>
<p><pre class="listing"><span class="Identifier">setTestData</span><span class="Punctuation">(</span><span class="StringLit">&quot;name&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;Hanz&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;password&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;12345&quot;</span><span class="Punctuation">)</span></pre></p>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L253" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L253" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="validateData-procs-all">
<div id="validateData,StringTableRef,varargs[string]">
<dt><pre><span class="Keyword">proc</span> <a href="#validateData%2CStringTableRef%2Cvarargs%5Bstring%5D"><span class="Identifier">validateData</span></a><span class="Other">(</span><span class="Identifier">data</span><span class="Other">:</span> <a href="strtabs.html#StringTableRef"><span class="Identifier">StringTableRef</span></a><span class="Other">;</span> <span class="Identifier">validKeys</span><span class="Other">:</span> <a href="system.html#varargs"><span class="Identifier">varargs</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">CgiError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Validates data; raises <tt class="docutils literal"><span class="pre"><span class="Identifier">CgiError</span></span></tt> if this fails. This checks that each variable name of the CGI <tt class="docutils literal"><span class="pre"><span class="Identifier">data</span></span></tt> occurs in the <tt class="docutils literal"><span class="pre"><span class="Identifier">validKeys</span></span></tt> array.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L118" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L118" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="writeContentType-procs-all">
<div id="writeContentType">
<dt><pre><span class="Keyword">proc</span> <a href="#writeContentType"><span class="Identifier">writeContentType</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Calls this before starting to send your HTML data to <tt class="docutils literal"><span class="pre"><span class="Identifier">stdout</span></span></tt>. This implements this part of the CGI protocol:</p>
<p><pre class="listing"><span class="Identifier">write</span><span class="Punctuation">(</span><span class="Identifier">stdout</span><span class="Punctuation">,</span> <span class="StringLit">&quot;Content-type: text/html</span><span class="EscapeSequence">\n</span><span class="EscapeSequence">\n</span><span class="StringLit">&quot;</span><span class="Punctuation">)</span></pre></p>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L271" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L271" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="writeErrorMessage-procs-all">
<div id="writeErrorMessage,string">
<dt><pre><span class="Keyword">proc</span> <a href="#writeErrorMessage%2Cstring"><span class="Identifier">writeErrorMessage</span></a><span class="Other">(</span><span class="Identifier">data</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Tries to reset browser state and writes <tt class="docutils literal"><span class="pre"><span class="Identifier">data</span></span></tt> to stdout in &lt;plaintext&gt; tag.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L289" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L289" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="xmlEncode-procs-all">
<div id="xmlEncode,string">
<dt><pre><span class="Keyword">proc</span> <a href="#xmlEncode%2Cstring"><span class="Identifier">xmlEncode</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Encodes a value to be XML safe:<ul class="simple"><li><tt class="docutils literal"><span class="pre"><span class="StringLit">&quot;</span></span></tt> is replaced by <tt class="docutils literal"><span class="pre"><span class="Operator">&amp;</span><span class="Identifier">quot</span><span class="Punctuation">;</span></span></tt></li>
<li><tt class="docutils literal"><span class="pre"><span class="Operator">&lt;</span></span></tt> is replaced by <tt class="docutils literal"><span class="pre"><span class="Operator">&amp;</span><span class="Identifier">lt</span><span class="Punctuation">;</span></span></tt></li>
<li><tt class="docutils literal"><span class="pre"><span class="Operator">&gt;</span></span></tt> is replaced by <tt class="docutils literal"><span class="pre"><span class="Operator">&amp;</span><span class="Identifier">gt</span><span class="Punctuation">;</span></span></tt></li>
<li><tt class="docutils literal"><span class="pre"><span class="Operator">&amp;</span></span></tt> is replaced by <tt class="docutils literal"><span class="pre"><span class="Operator">&amp;</span><span class="Identifier">amp</span><span class="Punctuation">;</span></span></tt></li>
<li>every other character is carried over.</li>
</ul>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L47" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L47" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
<div class="section" id="15">
<h1><a class="toc-backref" href="#15">Iterators</a></h1>
<dl class="item">
<div id="decodeData-iterators-all">
<div id="decodeData.i,set[RequestMethod]">
<dt><pre><span class="Keyword">iterator</span> <a href="#decodeData.i%2Cset%5BRequestMethod%5D"><span class="Identifier">decodeData</span></a><span class="Other">(</span><span class="Identifier">allowedMethods</span><span class="Other">:</span> <a href="system.html#set"><span class="Identifier">set</span></a><span class="Other">[</span><a href="cgi.html#RequestMethod"><span class="Identifier">RequestMethod</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Other">{</span><span class="Identifier">methodNone</span><span class="Other">,</span>
<span class="Identifier">methodPost</span><span class="Other">,</span> <span class="Identifier">methodGet</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">CgiError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Reads and decodes CGI data and yields the (name, value) pairs the data consists of. If the client does not use a method listed in the <tt class="docutils literal"><span class="pre"><span class="Identifier">allowedMethods</span></span></tt> set, a <tt class="docutils literal"><span class="pre"><span class="Identifier">CgiError</span></span></tt> exception is raised.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L95" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L95" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="decodeData.i,string">
<dt><pre><span class="Keyword">iterator</span> <a href="#decodeData.i%2Cstring"><span class="Identifier">decodeData</span></a><span class="Other">(</span><span class="Identifier">data</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Reads and decodes CGI data and yields the (name, value) pairs the data consists of.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/cgi.nim#L89" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/cgi.nim#L89" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
<div class="section" id="19">
<h1><a class="toc-backref" href="#19">Exports</a></h1>
<dl class="item">
<a href="uri.html#encodeUrl,string"><span class="Identifier">encodeUrl</span></a>, <a href="uri.html#decodeUrl,string"><span class="Identifier">decodeUrl</span></a>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2025-12-28 15:55:04 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>