summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2016-12-01 18:01:04 +0100
committerGitHub <noreply@github.com>2016-12-01 18:01:04 +0100
commitd6ab21eed53df590b25742c06ac4dff908d8b27d (patch)
tree6693286d786b17202be5e009cfcd006ebbebf225 /lib
parent0f700d22778d8d24a3a97c2bcac8885d4bd29cfa (diff)
parent74e442f766183237e8edca7bb68dca1da81a7d9f (diff)
downloadNim-d6ab21eed53df590b25742c06ac4dff908d8b27d.tar.gz
Merge pull request #5080 from FedericoCeratto/httpheaders
Add HTTP header deletion, improve tests
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/httpcore.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/httpcore.nim b/lib/pure/httpcore.nim
index 8147f1c50..48001ccaa 100644
--- a/lib/pure/httpcore.nim
+++ b/lib/pure/httpcore.nim
@@ -154,6 +154,10 @@ proc add*(headers: HttpHeaders, key, value: string) =
   else:
     headers.table[key.toLowerAscii].add(value)
 
+proc del*(headers: HttpHeaders, key: string) =
+  ## Delete the header entries associated with ``key``
+  headers.table.del(key.toLowerAscii)
+
 iterator pairs*(headers: HttpHeaders): tuple[key, value: string] =
   ## Yields each key, value pair.
   for k, v in headers.table: