Update docs of cookies.parseCookies. Closes #5721.

This commit is contained in:
Dominik Picheta
2017-11-18 11:26:18 +00:00
committed by GitHub
parent 8443e3f6be
commit a583d686b4

View File

@@ -13,6 +13,15 @@ import strtabs, times
proc parseCookies*(s: string): StringTableRef =
## parses cookies into a string table.
##
## The proc is meant to parse the Cookie header set by a client, not the
## "Set-Cookie" header set by servers.
##
## Example:
##
## .. code-block::Nim
## doAssert parseCookies("a=1; foo=bar") == {"a": 1, "foo": "bar"}.newStringTable
result = newStringTable(modeCaseInsensitive)
var i = 0
while true: