aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r--src/cowboy.erl9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index 3387224..3b272c5 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -19,6 +19,7 @@
-export([stop_listener/1]).
-export([set_env/3]).
+%% @todo Detailed opts.
-type opts() :: map().
-export_type([opts/0]).
@@ -27,19 +28,15 @@
| {atom(), cowboy_constraints:constraint() | [cowboy_constraints:constraint()], any()}].
-export_type([fields/0]).
--type http_headers() :: [{binary(), iodata()}].
+-type http_headers() :: #{binary() => iodata()}.
-export_type([http_headers/0]).
-type http_status() :: non_neg_integer() | binary().
-export_type([http_status/0]).
--type http_version() :: 'HTTP/1.1' | 'HTTP/1.0'.
+-type http_version() :: 'HTTP/2' | 'HTTP/1.1' | 'HTTP/1.0'.
-export_type([http_version/0]).
--type onresponse_fun() ::
- fun((http_status(), http_headers(), iodata(), Req) -> Req).
--export_type([onresponse_fun/0]).
-
-spec start_clear(ranch:ref(), non_neg_integer(), ranch_tcp:opts(),
cowboy_protocol:opts()) -> {ok, pid()} | {error, any()}.
start_clear(Ref, NbAcceptors, TransOpts0, ProtoOpts)