aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-09-02 18:54:52 +0200
committerLoïc Hoguin <[email protected]>2013-09-02 18:54:52 +0200
commit50b30bd1b33b9af03bc961da953087c53f8bdac3 (patch)
tree1a9369c03ec8348cbbc69e64124d5da93199bd86
parente0740ad183f05b2acd222e8388ac3e8af66b27e0 (diff)
downloadgun-50b30bd1b33b9af03bc961da953087c53f8bdac3.tar.gz
gun-50b30bd1b33b9af03bc961da953087c53f8bdac3.tar.bz2
gun-50b30bd1b33b9af03bc961da953087c53f8bdac3.zip
Fix specs for headers
-rw-r--r--manual/gun.md18
-rw-r--r--src/gun.erl2
2 files changed, 10 insertions, 10 deletions
diff --git a/manual/gun.md b/manual/gun.md
index 2446523..3baa1f7 100644
--- a/manual/gun.md
+++ b/manual/gun.md
@@ -148,7 +148,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
>
> Delete a resource.
@@ -159,7 +159,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
>
> Fetch a resource.
@@ -170,7 +170,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
>
> Fetch a resource's headers.
@@ -183,7 +183,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
>
> Obtain information about the capabilities of the server or a resource.
@@ -198,7 +198,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
> * Body = iodata()
>
@@ -220,7 +220,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
> * Body = iodata()
>
@@ -245,7 +245,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
> * Body = iodata()
>
@@ -270,7 +270,7 @@ Exports
> * ServerPid = pid()
> * Method = iodata()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
> * StreamRef = reference()
> * Body = iodata()
>
@@ -327,7 +327,7 @@ Exports
> Types:
> * ServerPid = pid()
> * Path = iodata()
-> * Headers = [{iodata(), iodata()}]
+> * Headers = [{binary(), iodata()}]
>
> Upgrade the connection to Websocket.
diff --git a/src/gun.erl b/src/gun.erl
index b1421af..2f472dc 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -57,7 +57,7 @@
-export([system_code_change/4]).
-type conn_type() :: ssl | tcp | tcp_spdy.
--type headers() :: [{iodata(), iodata()}].
+-type headers() :: [{binary(), iodata()}].
-type ws_close_code() :: 1000..4999.
-type ws_frame() :: close | ping | pong