123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416 |
- <?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/httpcore</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/httpcore</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </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="#HttpCode" title="HttpCode = distinct range[0 .. 599]">HttpCode</a></li>
- <li><a class="reference" href="#HttpHeaders" title="HttpHeaders = ref object
- table*: TableRef[string, seq[string]]">HttpHeaders</a></li>
- <li><a class="reference" href="#HttpHeaderValues" title="HttpHeaderValues = distinct seq[string]">HttpHeaderValues</a></li>
- <li><a class="reference" href="#HttpMethod" title="HttpMethod = enum
- HttpHead = "HEAD", ## Asks for the response identical to the one that
- ## would correspond to a GET request, but without
- ## the response body.
- HttpGet = "GET", ## Retrieves the specified resource.
- HttpPost = "POST", ## Submits data to be processed to the identified
- ## resource. The data is included in the body of
- ## the request.
- HttpPut = "PUT", ## Uploads a representation of the specified
- ## resource.
- HttpDelete = "DELETE", ## Deletes the specified resource.
- HttpTrace = "TRACE", ## Echoes back the received request, so that a
- ## client
- ## can see what intermediate servers are adding or
- ## changing in the request.
- HttpOptions = "OPTIONS", ## Returns the HTTP methods that the server
- ## supports for specified address.
- HttpConnect = "CONNECT", ## Converts the request connection to a transparent
- ## TCP/IP tunnel, usually used for proxies.
- HttpPatch = "PATCH" ## Applies partial modifications to a resource.">HttpMethod</a></li>
- <li><a class="reference" href="#HttpVersion" title="HttpVersion = enum
- HttpVer11, HttpVer10">HttpVersion</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#headerLimit" title="headerLimit = 10000">headerLimit</a></li>
- <li><a class="reference" href="#Http100" title="Http100 = 100">Http100</a></li>
- <li><a class="reference" href="#Http101" title="Http101 = 101">Http101</a></li>
- <li><a class="reference" href="#Http102" title="Http102 = 102">Http102</a></li>
- <li><a class="reference" href="#Http103" title="Http103 = 103">Http103</a></li>
- <li><a class="reference" href="#Http200" title="Http200 = 200">Http200</a></li>
- <li><a class="reference" href="#Http201" title="Http201 = 201">Http201</a></li>
- <li><a class="reference" href="#Http202" title="Http202 = 202">Http202</a></li>
- <li><a class="reference" href="#Http203" title="Http203 = 203">Http203</a></li>
- <li><a class="reference" href="#Http204" title="Http204 = 204">Http204</a></li>
- <li><a class="reference" href="#Http205" title="Http205 = 205">Http205</a></li>
- <li><a class="reference" href="#Http206" title="Http206 = 206">Http206</a></li>
- <li><a class="reference" href="#Http207" title="Http207 = 207">Http207</a></li>
- <li><a class="reference" href="#Http208" title="Http208 = 208">Http208</a></li>
- <li><a class="reference" href="#Http226" title="Http226 = 226">Http226</a></li>
- <li><a class="reference" href="#Http300" title="Http300 = 300">Http300</a></li>
- <li><a class="reference" href="#Http301" title="Http301 = 301">Http301</a></li>
- <li><a class="reference" href="#Http302" title="Http302 = 302">Http302</a></li>
- <li><a class="reference" href="#Http303" title="Http303 = 303">Http303</a></li>
- <li><a class="reference" href="#Http304" title="Http304 = 304">Http304</a></li>
- <li><a class="reference" href="#Http305" title="Http305 = 305">Http305</a></li>
- <li><a class="reference" href="#Http307" title="Http307 = 307">Http307</a></li>
- <li><a class="reference" href="#Http308" title="Http308 = 308">Http308</a></li>
- <li><a class="reference" href="#Http400" title="Http400 = 400">Http400</a></li>
- <li><a class="reference" href="#Http401" title="Http401 = 401">Http401</a></li>
- <li><a class="reference" href="#Http402" title="Http402 = 402">Http402</a></li>
- <li><a class="reference" href="#Http403" title="Http403 = 403">Http403</a></li>
- <li><a class="reference" href="#Http404" title="Http404 = 404">Http404</a></li>
- <li><a class="reference" href="#Http405" title="Http405 = 405">Http405</a></li>
- <li><a class="reference" href="#Http406" title="Http406 = 406">Http406</a></li>
- <li><a class="reference" href="#Http407" title="Http407 = 407">Http407</a></li>
- <li><a class="reference" href="#Http408" title="Http408 = 408">Http408</a></li>
- <li><a class="reference" href="#Http409" title="Http409 = 409">Http409</a></li>
- <li><a class="reference" href="#Http410" title="Http410 = 410">Http410</a></li>
- <li><a class="reference" href="#Http411" title="Http411 = 411">Http411</a></li>
- <li><a class="reference" href="#Http412" title="Http412 = 412">Http412</a></li>
- <li><a class="reference" href="#Http413" title="Http413 = 413">Http413</a></li>
- <li><a class="reference" href="#Http414" title="Http414 = 414">Http414</a></li>
- <li><a class="reference" href="#Http415" title="Http415 = 415">Http415</a></li>
- <li><a class="reference" href="#Http416" title="Http416 = 416">Http416</a></li>
- <li><a class="reference" href="#Http417" title="Http417 = 417">Http417</a></li>
- <li><a class="reference" href="#Http418" title="Http418 = 418">Http418</a></li>
- <li><a class="reference" href="#Http421" title="Http421 = 421">Http421</a></li>
- <li><a class="reference" href="#Http422" title="Http422 = 422">Http422</a></li>
- <li><a class="reference" href="#Http423" title="Http423 = 423">Http423</a></li>
- <li><a class="reference" href="#Http424" title="Http424 = 424">Http424</a></li>
- <li><a class="reference" href="#Http425" title="Http425 = 425">Http425</a></li>
- <li><a class="reference" href="#Http426" title="Http426 = 426">Http426</a></li>
- <li><a class="reference" href="#Http428" title="Http428 = 428">Http428</a></li>
- <li><a class="reference" href="#Http429" title="Http429 = 429">Http429</a></li>
- <li><a class="reference" href="#Http431" title="Http431 = 431">Http431</a></li>
- <li><a class="reference" href="#Http451" title="Http451 = 451">Http451</a></li>
- <li><a class="reference" href="#Http500" title="Http500 = 500">Http500</a></li>
- <li><a class="reference" href="#Http501" title="Http501 = 501">Http501</a></li>
- <li><a class="reference" href="#Http502" title="Http502 = 502">Http502</a></li>
- <li><a class="reference" href="#Http503" title="Http503 = 503">Http503</a></li>
- <li><a class="reference" href="#Http504" title="Http504 = 504">Http504</a></li>
- <li><a class="reference" href="#Http505" title="Http505 = 505">Http505</a></li>
- <li><a class="reference" href="#Http506" title="Http506 = 506">Http506</a></li>
- <li><a class="reference" href="#Http507" title="Http507 = 507">Http507</a></li>
- <li><a class="reference" href="#Http508" title="Http508 = 508">Http508</a></li>
- <li><a class="reference" href="#Http510" title="Http510 = 510">Http510</a></li>
- <li><a class="reference" href="#Http511" title="Http511 = 511">Http511</a></li>
- <li><a class="reference" href="#httpNewLine" title="httpNewLine = "\r\n"">httpNewLine</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">$
- <li><a class="reference" href="#%24%2CHttpCode" title="`$`(code: HttpCode): string">`$`(code: HttpCode): string</a></li>
- <li><a class="reference" href="#%24%2CHttpHeaders" title="`$`(headers: HttpHeaders): string">`$`(headers: HttpHeaders): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">==
- <li><a class="reference" href="#%3D%3D%2CHttpCode%2CHttpCode" title="`==`(a, b: HttpCode): bool">`==`(a, b: HttpCode): bool</a></li>
- <li><a class="reference" href="#%3D%3D%2Ctuple%5Bstring%2Cint%2Cint%5D%2CHttpVersion" title="`==`(protocol: tuple[orig: string, major, minor: int]; ver: HttpVersion): bool">`==`(protocol: tuple[orig: string, major, minor: int]; ver: HttpVersion): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">[]
- <li><a class="reference" href="#%5B%5D%2CHttpHeaders%2Cstring" title="`[]`(headers: HttpHeaders; key: string): HttpHeaderValues">`[]`(headers: HttpHeaders; key: string): HttpHeaderValues</a></li>
- <li><a class="reference" href="#%5B%5D%2CHttpHeaders%2Cstring%2Cint" title="`[]`(headers: HttpHeaders; key: string; i: int): string">`[]`(headers: HttpHeaders; key: string; i: int): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">[]=
- <li><a class="reference" href="#%5B%5D%3D%2CHttpHeaders%2Cstring%2Cstring" title="`[]=`(headers: HttpHeaders; key, value: string)">`[]=`(headers: HttpHeaders; key, value: string)</a></li>
- <li><a class="reference" href="#%5B%5D%3D%2CHttpHeaders%2Cstring%2Cseq%5Bstring%5D" title="`[]=`(headers: HttpHeaders; key: string; value: seq[string])">`[]=`(headers: HttpHeaders; key: string; value: seq[string])</a></li>
- </ul>
- <ul class="simple nested-toc-section">add
- <li><a class="reference" href="#add%2CHttpHeaders%2Cstring%2Cstring" title="add(headers: HttpHeaders; key, value: string)">add(headers: HttpHeaders; key, value: string)</a></li>
- </ul>
- <ul class="simple nested-toc-section">clear
- <li><a class="reference" href="#clear%2CHttpHeaders" title="clear(headers: HttpHeaders)">clear(headers: HttpHeaders)</a></li>
- </ul>
- <ul class="simple nested-toc-section">contains
- <li><a class="reference" href="#contains%2Cset%5BHttpMethod%5D%2Cstring" title="contains(methods: set[HttpMethod]; x: string): bool">contains(methods: set[HttpMethod]; x: string): bool</a></li>
- <li><a class="reference" href="#contains%2CHttpHeaderValues%2Cstring" title="contains(values: HttpHeaderValues; value: string): bool">contains(values: HttpHeaderValues; value: string): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">del
- <li><a class="reference" href="#del%2CHttpHeaders%2Cstring" title="del(headers: HttpHeaders; key: string)">del(headers: HttpHeaders; key: string)</a></li>
- </ul>
- <ul class="simple nested-toc-section">getOrDefault
- <li><a class="reference" href="#getOrDefault%2CHttpHeaders%2Cstring" title="getOrDefault(headers: HttpHeaders; key: string;
- default = @[""].HttpHeaderValues): HttpHeaderValues">getOrDefault(headers: HttpHeaders; key: string;
- default = @[""].HttpHeaderValues): HttpHeaderValues</a></li>
- </ul>
- <ul class="simple nested-toc-section">hasKey
- <li><a class="reference" href="#hasKey%2CHttpHeaders%2Cstring" title="hasKey(headers: HttpHeaders; key: string): bool">hasKey(headers: HttpHeaders; key: string): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">is1xx
- <li><a class="reference" href="#is1xx%2CHttpCode" title="is1xx(code: HttpCode): bool">is1xx(code: HttpCode): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">is2xx
- <li><a class="reference" href="#is2xx%2CHttpCode" title="is2xx(code: HttpCode): bool">is2xx(code: HttpCode): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">is3xx
- <li><a class="reference" href="#is3xx%2CHttpCode" title="is3xx(code: HttpCode): bool">is3xx(code: HttpCode): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">is4xx
- <li><a class="reference" href="#is4xx%2CHttpCode" title="is4xx(code: HttpCode): bool">is4xx(code: HttpCode): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">is5xx
- <li><a class="reference" href="#is5xx%2CHttpCode" title="is5xx(code: HttpCode): bool">is5xx(code: HttpCode): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">len
- <li><a class="reference" href="#len%2CHttpHeaders" title="len(headers: HttpHeaders): int">len(headers: HttpHeaders): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">newHttpHeaders
- <li><a class="reference" href="#newHttpHeaders%2CopenArray%5Btuple%5Bstring%2Cstring%5D%5D" title="newHttpHeaders(keyValuePairs: openArray[tuple[key: string, val: string]];
- titleCase = false): HttpHeaders">newHttpHeaders(keyValuePairs: openArray[tuple[key: string, val: string]];
- titleCase = false): HttpHeaders</a></li>
- <li><a class="reference" href="#newHttpHeaders" title="newHttpHeaders(titleCase = false): HttpHeaders">newHttpHeaders(titleCase = false): HttpHeaders</a></li>
- </ul>
- <ul class="simple nested-toc-section">parseHeader
- <li><a class="reference" href="#parseHeader%2Cstring" title="parseHeader(line: string): tuple[key: string, value: seq[string]]">parseHeader(line: string): tuple[key: string, value: seq[string]]</a></li>
- </ul>
- <ul class="simple nested-toc-section">toCaseInsensitive
- <li><a class="reference" href="#toCaseInsensitive%2CHttpHeaders%2Cstring" title="toCaseInsensitive(headers: HttpHeaders; s: string): string">toCaseInsensitive(headers: HttpHeaders; 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">pairs
- <li><a class="reference" href="#pairs.i%2CHttpHeaders" title="pairs(headers: HttpHeaders): tuple[key, value: string]">pairs(headers: HttpHeaders): tuple[key, value: string]</a></li>
- </ul>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#16" id="66">Converters</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">toString
- <li><a class="reference" href="#toString.c%2CHttpHeaderValues" title="toString(values: HttpHeaderValues): string">toString(values: HttpHeaderValues): string</a></li>
- </ul>
- </ul>
- </details>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc"><p>Contains functionality shared between the <tt class="docutils literal"><span class="pre"><span class="Identifier">httpclient</span></span></tt> and <tt class="docutils literal"><span class="pre"><span class="Identifier">asynchttpserver</span></span></tt> modules.</p>
- <p>Unstable API.</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="since.html">since</a>, <a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="parseutils.html">parseutils</a>
- </dl>
- </div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <div id="HttpCode">
- <dt><pre><a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <a href="system.html#range"><span class="Identifier">range</span></a><span class="Other">[</span><span class="DecNumber">0</span> <span class="Operator">..</span> <span class="DecNumber">599</span><span class="Other">]</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L26" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L26" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="HttpHeaders">
- <dt><pre><a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
- <span class="Identifier">table</span><span class="Operator">*</span><span class="Other">:</span> <a href="tables.html#TableRef"><span class="Identifier">TableRef</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <a href="system.html#seq"><span class="Identifier">seq</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></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L18" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L18" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="HttpHeaderValues">
- <dt><pre><a href="httpcore.html#HttpHeaderValues"><span class="Identifier">HttpHeaderValues</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L22" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L22" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="HttpMethod">
- <dt><pre><a href="httpcore.html#HttpMethod"><span class="Identifier">HttpMethod</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">HttpHead</span> <span class="Other">=</span> <span class="StringLit">"HEAD"</span><span class="Other">,</span> <span class="Comment">## Asks for the response identical to the one that</span>
- <span class="Comment">## would correspond to a GET request, but without</span>
- <span class="Comment">## the response body.</span>
- <span class="Identifier">HttpGet</span> <span class="Other">=</span> <span class="StringLit">"GET"</span><span class="Other">,</span> <span class="Comment">## Retrieves the specified resource.</span>
- <span class="Identifier">HttpPost</span> <span class="Other">=</span> <span class="StringLit">"POST"</span><span class="Other">,</span> <span class="Comment">## Submits data to be processed to the identified</span>
- <span class="Comment">## resource. The data is included in the body of</span>
- <span class="Comment">## the request.</span>
- <span class="Identifier">HttpPut</span> <span class="Other">=</span> <span class="StringLit">"PUT"</span><span class="Other">,</span> <span class="Comment">## Uploads a representation of the specified</span>
- <span class="Comment">## resource.</span>
- <span class="Identifier">HttpDelete</span> <span class="Other">=</span> <span class="StringLit">"DELETE"</span><span class="Other">,</span> <span class="Comment">## Deletes the specified resource.</span>
- <span class="Identifier">HttpTrace</span> <span class="Other">=</span> <span class="StringLit">"TRACE"</span><span class="Other">,</span> <span class="Comment">## Echoes back the received request, so that a</span>
- <span class="Comment">## client</span>
- <span class="Comment">## can see what intermediate servers are adding or</span>
- <span class="Comment">## changing in the request.</span>
- <span class="Identifier">HttpOptions</span> <span class="Other">=</span> <span class="StringLit">"OPTIONS"</span><span class="Other">,</span> <span class="Comment">## Returns the HTTP methods that the server</span>
- <span class="Comment">## supports for specified address.</span>
- <span class="Identifier">HttpConnect</span> <span class="Other">=</span> <span class="StringLit">"CONNECT"</span><span class="Other">,</span> <span class="Comment">## Converts the request connection to a transparent</span>
- <span class="Comment">## TCP/IP tunnel, usually used for proxies.</span>
- <span class="Identifier">HttpPatch</span> <span class="Other">=</span> <span class="StringLit">"PATCH"</span> <span class="Comment">## Applies partial modifications to a resource.</span></pre></dt>
- <dd>
-
- the requested HttpMethod
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L32" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L32" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="HttpVersion">
- <dt><pre><a href="httpcore.html#HttpVersion"><span class="Identifier">HttpVersion</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">HttpVer11</span><span class="Other">,</span> <span class="Identifier">HttpVer10</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L28" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L28" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="10">
- <h1><a class="toc-backref" href="#10">Consts</a></h1>
- <dl class="item">
- <div id="headerLimit">
- <dt><pre><a href="httpcore.html#headerLimit"><span class="Identifier">headerLimit</span></a> <span class="Other">=</span> <span class="DecNumber">10000</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L120" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L120" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http100">
- <dt><pre><a href="httpcore.html#Http100"><span class="Identifier">Http100</span></a> <span class="Other">=</span> <span class="DecNumber">100</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L55" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L55" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http101">
- <dt><pre><a href="httpcore.html#Http101"><span class="Identifier">Http101</span></a> <span class="Other">=</span> <span class="DecNumber">101</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L56" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L56" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http102">
- <dt><pre><a href="httpcore.html#Http102"><span class="Identifier">Http102</span></a> <span class="Other">=</span> <span class="DecNumber">102</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc2518.html">https://tools.ietf.org/html/rfc2518.html</a> WebDAV
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L57" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L57" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http103">
- <dt><pre><a href="httpcore.html#Http103"><span class="Identifier">Http103</span></a> <span class="Other">=</span> <span class="DecNumber">103</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc8297.html">https://tools.ietf.org/html/rfc8297.html</a> Early hints
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L58" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L58" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http200">
- <dt><pre><a href="httpcore.html#Http200"><span class="Identifier">Http200</span></a> <span class="Other">=</span> <span class="DecNumber">200</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L59" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L59" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http201">
- <dt><pre><a href="httpcore.html#Http201"><span class="Identifier">Http201</span></a> <span class="Other">=</span> <span class="DecNumber">201</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L60" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L60" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http202">
- <dt><pre><a href="httpcore.html#Http202"><span class="Identifier">Http202</span></a> <span class="Other">=</span> <span class="DecNumber">202</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L61" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L61" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http203">
- <dt><pre><a href="httpcore.html#Http203"><span class="Identifier">Http203</span></a> <span class="Other">=</span> <span class="DecNumber">203</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L62" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L62" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http204">
- <dt><pre><a href="httpcore.html#Http204"><span class="Identifier">Http204</span></a> <span class="Other">=</span> <span class="DecNumber">204</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L63" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L63" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http205">
- <dt><pre><a href="httpcore.html#Http205"><span class="Identifier">Http205</span></a> <span class="Other">=</span> <span class="DecNumber">205</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L64" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L64" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http206">
- <dt><pre><a href="httpcore.html#Http206"><span class="Identifier">Http206</span></a> <span class="Other">=</span> <span class="DecNumber">206</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L65" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L65" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http207">
- <dt><pre><a href="httpcore.html#Http207"><span class="Identifier">Http207</span></a> <span class="Other">=</span> <span class="DecNumber">207</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc4918.html">https://tools.ietf.org/html/rfc4918.html</a> WebDAV
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L66" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L66" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http208">
- <dt><pre><a href="httpcore.html#Http208"><span class="Identifier">Http208</span></a> <span class="Other">=</span> <span class="DecNumber">208</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc5842.html">https://tools.ietf.org/html/rfc5842.html</a> WebDAV, Section 7.1
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L67" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L67" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http226">
- <dt><pre><a href="httpcore.html#Http226"><span class="Identifier">Http226</span></a> <span class="Other">=</span> <span class="DecNumber">226</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc3229.html">https://tools.ietf.org/html/rfc3229.html</a> Delta encoding, Section 10.4.1
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L68" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L68" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http300">
- <dt><pre><a href="httpcore.html#Http300"><span class="Identifier">Http300</span></a> <span class="Other">=</span> <span class="DecNumber">300</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L69" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L69" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http301">
- <dt><pre><a href="httpcore.html#Http301"><span class="Identifier">Http301</span></a> <span class="Other">=</span> <span class="DecNumber">301</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L70" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L70" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http302">
- <dt><pre><a href="httpcore.html#Http302"><span class="Identifier">Http302</span></a> <span class="Other">=</span> <span class="DecNumber">302</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L71" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L71" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http303">
- <dt><pre><a href="httpcore.html#Http303"><span class="Identifier">Http303</span></a> <span class="Other">=</span> <span class="DecNumber">303</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L72" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L72" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http304">
- <dt><pre><a href="httpcore.html#Http304"><span class="Identifier">Http304</span></a> <span class="Other">=</span> <span class="DecNumber">304</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L73" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L73" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http305">
- <dt><pre><a href="httpcore.html#Http305"><span class="Identifier">Http305</span></a> <span class="Other">=</span> <span class="DecNumber">305</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L74" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L74" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http307">
- <dt><pre><a href="httpcore.html#Http307"><span class="Identifier">Http307</span></a> <span class="Other">=</span> <span class="DecNumber">307</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L75" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L75" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http308">
- <dt><pre><a href="httpcore.html#Http308"><span class="Identifier">Http308</span></a> <span class="Other">=</span> <span class="DecNumber">308</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L76" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L76" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http400">
- <dt><pre><a href="httpcore.html#Http400"><span class="Identifier">Http400</span></a> <span class="Other">=</span> <span class="DecNumber">400</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L77" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L77" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http401">
- <dt><pre><a href="httpcore.html#Http401"><span class="Identifier">Http401</span></a> <span class="Other">=</span> <span class="DecNumber">401</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L78" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L78" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http402">
- <dt><pre><a href="httpcore.html#Http402"><span class="Identifier">Http402</span></a> <span class="Other">=</span> <span class="DecNumber">402</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc7231.html">https://tools.ietf.org/html/rfc7231.html</a> Payment required, Section 6.5.2
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L79" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L79" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http403">
- <dt><pre><a href="httpcore.html#Http403"><span class="Identifier">Http403</span></a> <span class="Other">=</span> <span class="DecNumber">403</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L80" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L80" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http404">
- <dt><pre><a href="httpcore.html#Http404"><span class="Identifier">Http404</span></a> <span class="Other">=</span> <span class="DecNumber">404</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L81" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L81" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http405">
- <dt><pre><a href="httpcore.html#Http405"><span class="Identifier">Http405</span></a> <span class="Other">=</span> <span class="DecNumber">405</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L82" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L82" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http406">
- <dt><pre><a href="httpcore.html#Http406"><span class="Identifier">Http406</span></a> <span class="Other">=</span> <span class="DecNumber">406</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L83" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L83" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http407">
- <dt><pre><a href="httpcore.html#Http407"><span class="Identifier">Http407</span></a> <span class="Other">=</span> <span class="DecNumber">407</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L84" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L84" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http408">
- <dt><pre><a href="httpcore.html#Http408"><span class="Identifier">Http408</span></a> <span class="Other">=</span> <span class="DecNumber">408</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L85" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L85" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http409">
- <dt><pre><a href="httpcore.html#Http409"><span class="Identifier">Http409</span></a> <span class="Other">=</span> <span class="DecNumber">409</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L86" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L86" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http410">
- <dt><pre><a href="httpcore.html#Http410"><span class="Identifier">Http410</span></a> <span class="Other">=</span> <span class="DecNumber">410</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L87" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L87" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http411">
- <dt><pre><a href="httpcore.html#Http411"><span class="Identifier">Http411</span></a> <span class="Other">=</span> <span class="DecNumber">411</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L88" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L88" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http412">
- <dt><pre><a href="httpcore.html#Http412"><span class="Identifier">Http412</span></a> <span class="Other">=</span> <span class="DecNumber">412</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L89" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L89" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http413">
- <dt><pre><a href="httpcore.html#Http413"><span class="Identifier">Http413</span></a> <span class="Other">=</span> <span class="DecNumber">413</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L90" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L90" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http414">
- <dt><pre><a href="httpcore.html#Http414"><span class="Identifier">Http414</span></a> <span class="Other">=</span> <span class="DecNumber">414</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L91" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L91" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http415">
- <dt><pre><a href="httpcore.html#Http415"><span class="Identifier">Http415</span></a> <span class="Other">=</span> <span class="DecNumber">415</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L92" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L92" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http416">
- <dt><pre><a href="httpcore.html#Http416"><span class="Identifier">Http416</span></a> <span class="Other">=</span> <span class="DecNumber">416</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L93" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L93" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http417">
- <dt><pre><a href="httpcore.html#Http417"><span class="Identifier">Http417</span></a> <span class="Other">=</span> <span class="DecNumber">417</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L94" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L94" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http418">
- <dt><pre><a href="httpcore.html#Http418"><span class="Identifier">Http418</span></a> <span class="Other">=</span> <span class="DecNumber">418</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L95" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L95" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http421">
- <dt><pre><a href="httpcore.html#Http421"><span class="Identifier">Http421</span></a> <span class="Other">=</span> <span class="DecNumber">421</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L96" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L96" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http422">
- <dt><pre><a href="httpcore.html#Http422"><span class="Identifier">Http422</span></a> <span class="Other">=</span> <span class="DecNumber">422</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L97" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L97" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http423">
- <dt><pre><a href="httpcore.html#Http423"><span class="Identifier">Http423</span></a> <span class="Other">=</span> <span class="DecNumber">423</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc4918.html">https://tools.ietf.org/html/rfc4918.html</a> WebDAV, Section 11.3
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L98" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L98" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http424">
- <dt><pre><a href="httpcore.html#Http424"><span class="Identifier">Http424</span></a> <span class="Other">=</span> <span class="DecNumber">424</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc4918.html">https://tools.ietf.org/html/rfc4918.html</a> WebDAV, Section 11.3
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L99" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L99" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http425">
- <dt><pre><a href="httpcore.html#Http425"><span class="Identifier">Http425</span></a> <span class="Other">=</span> <span class="DecNumber">425</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc8470.html">https://tools.ietf.org/html/rfc8470.html</a> Early data
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L100" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L100" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http426">
- <dt><pre><a href="httpcore.html#Http426"><span class="Identifier">Http426</span></a> <span class="Other">=</span> <span class="DecNumber">426</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L101" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L101" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http428">
- <dt><pre><a href="httpcore.html#Http428"><span class="Identifier">Http428</span></a> <span class="Other">=</span> <span class="DecNumber">428</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L102" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L102" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http429">
- <dt><pre><a href="httpcore.html#Http429"><span class="Identifier">Http429</span></a> <span class="Other">=</span> <span class="DecNumber">429</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L103" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L103" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http431">
- <dt><pre><a href="httpcore.html#Http431"><span class="Identifier">Http431</span></a> <span class="Other">=</span> <span class="DecNumber">431</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L104" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L104" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http451">
- <dt><pre><a href="httpcore.html#Http451"><span class="Identifier">Http451</span></a> <span class="Other">=</span> <span class="DecNumber">451</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L105" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L105" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http500">
- <dt><pre><a href="httpcore.html#Http500"><span class="Identifier">Http500</span></a> <span class="Other">=</span> <span class="DecNumber">500</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L106" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L106" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http501">
- <dt><pre><a href="httpcore.html#Http501"><span class="Identifier">Http501</span></a> <span class="Other">=</span> <span class="DecNumber">501</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L107" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L107" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http502">
- <dt><pre><a href="httpcore.html#Http502"><span class="Identifier">Http502</span></a> <span class="Other">=</span> <span class="DecNumber">502</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L108" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L108" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http503">
- <dt><pre><a href="httpcore.html#Http503"><span class="Identifier">Http503</span></a> <span class="Other">=</span> <span class="DecNumber">503</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L109" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L109" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http504">
- <dt><pre><a href="httpcore.html#Http504"><span class="Identifier">Http504</span></a> <span class="Other">=</span> <span class="DecNumber">504</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L110" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L110" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http505">
- <dt><pre><a href="httpcore.html#Http505"><span class="Identifier">Http505</span></a> <span class="Other">=</span> <span class="DecNumber">505</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L111" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L111" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http506">
- <dt><pre><a href="httpcore.html#Http506"><span class="Identifier">Http506</span></a> <span class="Other">=</span> <span class="DecNumber">506</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc2295.html">https://tools.ietf.org/html/rfc2295.html</a> Content negotiation, Section 8.1
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L112" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L112" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http507">
- <dt><pre><a href="httpcore.html#Http507"><span class="Identifier">Http507</span></a> <span class="Other">=</span> <span class="DecNumber">507</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc4918.html">https://tools.ietf.org/html/rfc4918.html</a> WebDAV, Section 11.5
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L113" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L113" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http508">
- <dt><pre><a href="httpcore.html#Http508"><span class="Identifier">Http508</span></a> <span class="Other">=</span> <span class="DecNumber">508</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc5842.html">https://tools.ietf.org/html/rfc5842.html</a> WebDAV, Section 7.2
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L114" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L114" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http510">
- <dt><pre><a href="httpcore.html#Http510"><span class="Identifier">Http510</span></a> <span class="Other">=</span> <span class="DecNumber">510</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc2774.html">https://tools.ietf.org/html/rfc2774.html</a> Extension framework, Section 7
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L115" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L115" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="Http511">
- <dt><pre><a href="httpcore.html#Http511"><span class="Identifier">Http511</span></a> <span class="Other">=</span> <span class="DecNumber">511</span></pre></dt>
- <dd>
-
- <a class="reference external" href="https://tools.ietf.org/html/rfc6585.html">https://tools.ietf.org/html/rfc6585.html</a> Additional status code, Section 6
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L116" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L116" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="httpNewLine">
- <dt><pre><a href="httpcore.html#httpNewLine"><span class="Identifier">httpNewLine</span></a> <span class="Other">=</span> <span class="StringLit">"\r\n"</span></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L119" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L119" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <div id="$-procs-all">
- <div id="$,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#%24%2CHttpCode"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">code</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</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>
-
- Converts the specified <tt class="docutils literal"><span class="pre"><span class="Identifier">HttpCode</span></span></tt> into a HTTP status.
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Identifier">doAssert</span><span class="Punctuation">(</span><span class="Operator">$</span><span class="Identifier">Http404</span> <span class="Operator">==</span> <span class="StringLit">"404 Not Found"</span><span class="Punctuation">)</span></pre>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L278" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L278" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="$,HttpHeaders">
- <dt><pre><span class="Keyword">func</span> <a href="#%24%2CHttpHeaders"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span class="Identifier">inline</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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L152" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L152" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="==-procs-all">
- <div id="==,HttpCode,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#%3D%3D%2CHttpCode%2CHttpCode"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">borrow</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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L347" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L347" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="==,tuple[string,int,int],HttpVersion">
- <dt><pre><span class="Keyword">func</span> <a href="#%3D%3D%2Ctuple%5Bstring%2Cint%2Cint%5D%2CHttpVersion"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">protocol</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">orig</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <span class="Identifier">major</span><span class="Other">,</span> <span class="Identifier">minor</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">ver</span><span class="Other">:</span> <a href="httpcore.html#HttpVersion"><span class="Identifier">HttpVersion</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="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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L264" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L264" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="[]-procs-all">
- <div id="[],HttpHeaders,string">
- <dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%2CHttpHeaders%2Cstring"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">;</span> <span class="Identifier">key</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="httpcore.html#HttpHeaderValues"><span class="Identifier">HttpHeaderValues</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">KeyError</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>
-
- <p>Returns the values associated with the given <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt>. If the returned values are passed to a procedure expecting a <tt class="docutils literal"><span class="pre"><span class="Identifier">string</span></span></tt>, the first value is automatically picked. If there are no values associated with the key, an exception is raised.</p>
- <p>To access multiple values of a key, use the overloaded <tt class="docutils literal"><span class="pre"><span class="Punctuation">[</span><span class="Punctuation">]</span></span></tt> below or to get all of them access the <tt class="docutils literal"><span class="pre"><span class="Identifier">table</span></span></tt> field directly.</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L158" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L158" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="[],HttpHeaders,string,int">
- <dt><pre><span class="Keyword">func</span> <a href="#%5B%5D%2CHttpHeaders%2Cstring%2Cint"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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="Identifier">KeyError</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>
-
- Returns the <tt class="docutils literal"><span class="pre"><span class="Identifier">i</span></span></tt>'th value associated with the given key. If there are no values associated with the key or the <tt class="docutils literal"><span class="pre"><span class="Identifier">i</span></span></tt>'th value doesn't exist, an exception is raised.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L173" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L173" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="[]=-procs-all">
- <div id="[]=,HttpHeaders,string,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CHttpHeaders%2Cstring%2Cstring"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><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>
-
- Sets the header entries associated with <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> to the specified value. Replaces any existing values.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L180" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L180" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="[]=,HttpHeaders,string,seq[string]">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CHttpHeaders%2Cstring%2Cseq%5Bstring%5D"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</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="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>
-
- Sets the header entries associated with <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt> to the specified list of values. Replaces any existing values. If <tt class="docutils literal"><span class="pre"><span class="Identifier">value</span></span></tt> is empty, deletes the header entries associated with <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L185" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L185" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="add-procs-all">
- <div id="add,HttpHeaders,string,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#add%2CHttpHeaders%2Cstring%2Cstring"><span class="Identifier">add</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><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">KeyError</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>
-
- Adds the specified value to the specified key. Appends to any existing values associated with the key.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L194" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L194" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="clear-procs-all">
- <div id="clear,HttpHeaders">
- <dt><pre><span class="Keyword">proc</span> <a href="#clear%2CHttpHeaders"><span class="Identifier">clear</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">)</span> {.<span class="Identifier">inline</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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L155" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L155" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="contains-procs-all">
- <div id="contains,set[HttpMethod],string">
- <dt><pre><span class="Keyword">func</span> <a href="#contains%2Cset%5BHttpMethod%5D%2Cstring"><span class="Identifier">contains</span></a><span class="Other">(</span><span class="Identifier">methods</span><span class="Other">:</span> <a href="system.html#set"><span class="Identifier">set</span></a><span class="Other">[</span><a href="httpcore.html#HttpMethod"><span class="Identifier">HttpMethod</span></a><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">x</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="Identifier">ValueError</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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L275" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L275" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="contains,HttpHeaderValues,string">
- <dt><pre><span class="Keyword">func</span> <a href="#contains%2CHttpHeaderValues%2Cstring"><span class="Identifier">contains</span></a><span class="Other">(</span><span class="Identifier">values</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaderValues"><span class="Identifier">HttpHeaderValues</span></a><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 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="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>
-
- Determines if <tt class="docutils literal"><span class="pre"><span class="Identifier">value</span></span></tt> is one of the values inside <tt class="docutils literal"><span class="pre"><span class="Identifier">values</span></span></tt>. Comparison is performed without case sensitivity.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L212" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L212" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="del-procs-all">
- <div id="del,HttpHeaders,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#del%2CHttpHeaders%2Cstring"><span class="Identifier">del</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">;</span> <span class="Identifier">key</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>
-
- Deletes the header entries associated with <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L202" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L202" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getOrDefault-procs-all">
- <div id="getOrDefault,HttpHeaders,string">
- <dt><pre><span class="Keyword">func</span> <a href="#getOrDefault%2CHttpHeaders%2Cstring"><span class="Identifier">getOrDefault</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">;</span> <span class="Identifier">key</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span>
- <span class="Identifier">default</span> <span class="Other">=</span> <span class="Operator">@</span><span class="Other">[</span><span class="StringLit">""</span><span class="Other">]</span><span class="Other">.</span><span class="Identifier">HttpHeaderValues</span><span class="Other">)</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaderValues"><span class="Identifier">HttpHeaderValues</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">KeyError</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>
-
- Returns the values associated with the given <tt class="docutils literal"><span class="pre"><span class="Identifier">key</span></span></tt>. If there are no values associated with the key, then <tt class="docutils literal"><span class="pre"><span class="Identifier">default</span></span></tt> is returned.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L222" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L222" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="hasKey-procs-all">
- <div id="hasKey,HttpHeaders,string">
- <dt><pre><span class="Keyword">func</span> <a href="#hasKey%2CHttpHeaders%2Cstring"><span class="Identifier">hasKey</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">;</span> <span class="Identifier">key</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="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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L219" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L219" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="is1xx-procs-all">
- <div id="is1xx,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#is1xx%2CHttpCode"><span class="Identifier">is1xx</span></a><span class="Other">(</span><span class="Identifier">code</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</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>
-
- Determines whether <tt class="docutils literal"><span class="pre"><span class="Identifier">code</span></span></tt> is a 1xx HTTP status code.
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Identifier">doAssert</span> <span class="Identifier">is1xx</span><span class="Punctuation">(</span><span class="Identifier">HttpCode</span><span class="Punctuation">(</span><span class="DecNumber">103</span><span class="Punctuation">)</span><span class="Punctuation">)</span></pre>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L349" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L349" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="is2xx-procs-all">
- <div id="is2xx,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#is2xx%2CHttpCode"><span class="Identifier">is2xx</span></a><span class="Other">(</span><span class="Identifier">code</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</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>
-
- Determines whether <tt class="docutils literal"><span class="pre"><span class="Identifier">code</span></span></tt> is a 2xx HTTP status code.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L356" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L356" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="is3xx-procs-all">
- <div id="is3xx,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#is3xx%2CHttpCode"><span class="Identifier">is3xx</span></a><span class="Other">(</span><span class="Identifier">code</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</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>
-
- Determines whether <tt class="docutils literal"><span class="pre"><span class="Identifier">code</span></span></tt> is a 3xx HTTP status code.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L360" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L360" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="is4xx-procs-all">
- <div id="is4xx,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#is4xx%2CHttpCode"><span class="Identifier">is4xx</span></a><span class="Other">(</span><span class="Identifier">code</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</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>
-
- Determines whether <tt class="docutils literal"><span class="pre"><span class="Identifier">code</span></span></tt> is a 4xx HTTP status code.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L364" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L364" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="is5xx-procs-all">
- <div id="is5xx,HttpCode">
- <dt><pre><span class="Keyword">func</span> <a href="#is5xx%2CHttpCode"><span class="Identifier">is5xx</span></a><span class="Other">(</span><span class="Identifier">code</span><span class="Other">:</span> <a href="httpcore.html#HttpCode"><span class="Identifier">HttpCode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</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>
-
- Determines whether <tt class="docutils literal"><span class="pre"><span class="Identifier">code</span></span></tt> is a 5xx HTTP status code.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L368" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L368" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="len-procs-all">
- <div id="len,HttpHeaders">
- <dt><pre><span class="Keyword">func</span> <a href="#len%2CHttpHeaders"><span class="Identifier">len</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> {.<span class="Identifier">inline</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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L231" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L231" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="newHttpHeaders-procs-all">
- <div id="newHttpHeaders,openArray[tuple[string,string]]">
- <dt><pre><span class="Keyword">func</span> <a href="#newHttpHeaders%2CopenArray%5Btuple%5Bstring%2Cstring%5D%5D"><span class="Identifier">newHttpHeaders</span></a><span class="Other">(</span><span class="Identifier">keyValuePairs</span><span class="Other">:</span> <a href="system.html#openArray"><span class="Identifier">openArray</span></a><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">key</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <span class="Identifier">val</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="Other">;</span>
- <span class="Identifier">titleCase</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</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">KeyError</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>
-
- Returns a new <tt class="docutils literal"><span class="pre"><span class="Identifier">HttpHeaders</span></span></tt> object from an array. if <tt class="docutils literal"><span class="pre"><span class="Identifier">titleCase</span></span></tt> is set to true, headers are passed to the server in title case (e.g. "Content-Length")
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L138" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L138" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="newHttpHeaders">
- <dt><pre><span class="Keyword">func</span> <a href="#newHttpHeaders"><span class="Identifier">newHttpHeaders</span></a><span class="Other">(</span><span class="Identifier">titleCase</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</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>
-
- Returns a new <tt class="docutils literal"><span class="pre"><span class="Identifier">HttpHeaders</span></span></tt> object. if <tt class="docutils literal"><span class="pre"><span class="Identifier">titleCase</span></span></tt> is set to true, headers are passed to the server in title case (e.g. "Content-Length")
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L133" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L133" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="parseHeader-procs-all">
- <div id="parseHeader,string">
- <dt><pre><span class="Keyword">func</span> <a href="#parseHeader%2Cstring"><span class="Identifier">parseHeader</span></a><span class="Other">(</span><span class="Identifier">line</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> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</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="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>
-
- <p>Parses a single raw header HTTP line into key value pairs.</p>
- <p>Used by <tt class="docutils literal"><span class="pre"><span class="Identifier">asynchttpserver</span></span></tt> and <tt class="docutils literal"><span class="pre"><span class="Identifier">httpclient</span></span></tt> internally and should not be used by you.</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L244" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L244" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="toCaseInsensitive-procs-all">
- <div id="toCaseInsensitive,HttpHeaders,string">
- <dt><pre><span class="Keyword">func</span> <a href="#toCaseInsensitive%2CHttpHeaders%2Cstring"><span class="Identifier">toCaseInsensitive</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</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 class="Identifier">inline</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>
-
- For internal usage only. Do not use.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L129" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L129" class="link-seesrc" target="_blank" >Edit</a>
- </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="pairs-iterators-all">
- <div id="pairs.i,HttpHeaders">
- <dt><pre><span class="Keyword">iterator</span> <a href="#pairs.i%2CHttpHeaders"><span class="Identifier">pairs</span></a><span class="Other">(</span><span class="Identifier">headers</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaders"><span class="Identifier">HttpHeaders</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>
-
- Yields each key, value pair.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L206" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L206" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- <div class="section" id="16">
- <h1><a class="toc-backref" href="#16">Converters</a></h1>
- <dl class="item">
- <div id="toString-converters-all">
- <div id="toString.c,HttpHeaderValues">
- <dt><pre><span class="Keyword">converter</span> <a href="#toString.c%2CHttpHeaderValues"><span class="Identifier">toString</span></a><span class="Other">(</span><span class="Identifier">values</span><span class="Other">:</span> <a href="httpcore.html#HttpHeaderValues"><span class="Identifier">HttpHeaderValues</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>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/httpcore.nim#L170" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/httpcore.nim#L170" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </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-01-09 12:00:08 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|