aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/content_types_accepted_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/handlers/content_types_accepted_h.erl')
-rw-r--r--test/handlers/content_types_accepted_h.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/handlers/content_types_accepted_h.erl b/test/handlers/content_types_accepted_h.erl
index 7aec1bb..b871dc8 100644
--- a/test/handlers/content_types_accepted_h.erl
+++ b/test/handlers/content_types_accepted_h.erl
@@ -7,6 +7,7 @@
-export([allowed_methods/2]).
-export([content_types_accepted/2]).
-export([put_multipart_mixed/2]).
+-export([put_text_plain/2]).
init(Req, Opts) ->
{cowboy_rest, Req, Opts}.
@@ -17,7 +18,13 @@ allowed_methods(Req, State) ->
content_types_accepted(Req=#{qs := <<"multipart">>}, State) ->
{[
{{<<"multipart">>, <<"mixed">>, [{<<"v">>, <<"1">>}]}, put_multipart_mixed}
- ], Req, State}.
+ ], Req, State};
+content_types_accepted(Req=#{qs := <<"wildcard-param">>}, State) ->
+ {[{{<<"text">>, <<"plain">>, '*'}, put_text_plain}], Req, State}.
put_multipart_mixed(Req, State) ->
{true, Req, State}.
+
+put_text_plain(Req0, State) ->
+ {ok, _, Req} = cowboy_req:read_body(Req0),
+ {true, Req, State}.