aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/gun.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-01-06 17:01:41 +0100
committerLoïc Hoguin <[email protected]>2019-01-06 17:01:41 +0100
commitab4878838fafbd453b41d031c9224b2ee8d2d956 (patch)
tree432a9fa69523af7637c3eeab0435b625c70a2cbd /doc/src/manual/gun.asciidoc
parenteee5a59bc1763fc2e1c8c6e7155939dd04d930b7 (diff)
downloadgun-ab4878838fafbd453b41d031c9224b2ee8d2d956.tar.gz
gun-ab4878838fafbd453b41d031c9224b2ee8d2d956.tar.bz2
gun-ab4878838fafbd453b41d031c9224b2ee8d2d956.zip
Lowercase header names automatically and accept more types
Header names can now be provided as binary, string or atom and Gun no longer requires them to be in lowercase. The list of headers can also be provided as a map as well.
Diffstat (limited to 'doc/src/manual/gun.asciidoc')
-rw-r--r--doc/src/manual/gun.asciidoc14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc
index dff927c..2726564 100644
--- a/doc/src/manual/gun.asciidoc
+++ b/doc/src/manual/gun.asciidoc
@@ -267,6 +267,16 @@ ws_opts (#{})::
Options specific to the Websocket protocol.
+=== req_headers()
+
+[source,erlang]
+----
+req_headers() :: [{binary() | string() | atom(), iodata()}]
+ | #{binary() | string() | atom() => iodata()}
+----
+
+Request headers.
+
=== req_opts()
[source,erlang]
@@ -315,6 +325,10 @@ undocumented and must be set to `gun_ws_h`.
== Changelog
+* *2.0*: Introduce the type `req_headers()` and extend the
+ types accepted for header names for greater
+ interoperability. Header names are automatically
+ lowercased as well.
* *2.0*: Function `gun:headers/4,5` introduced.
* *2.0*: The `keepalive` option is now set to `infinity` by
default for the HTTP/1.1 protocol, disabling it.