aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-10 11:49:31 +0200
committerLoïc Hoguin <[email protected]>2016-08-10 11:49:31 +0200
commitae0dd616737d8e1116de4a04be0bc84188997eb0 (patch)
tree57c95ae977f6b6c49c0fe06e4bb68157815faa46 /src/cowboy.erl
parent0ba3a9a22269d21b2962fec78c03e5671294d20d (diff)
downloadcowboy-ae0dd616737d8e1116de4a04be0bc84188997eb0.tar.gz
cowboy-ae0dd616737d8e1116de4a04be0bc84188997eb0.tar.bz2
cowboy-ae0dd616737d8e1116de4a04be0bc84188997eb0.zip
Add tests for responses and request body reading
This is a large commit. The cowboy_req interface has largely changed, and will change a little more. It's possible that some examples or tests have not been converted to the new interface yet. The documentation has not yet been updated. All of this will be fixed in smaller subsequent commits. Gotta start somewhere...
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r--src/cowboy.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index 3387224..8ef9f8a 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -27,19 +27,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)