aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/cookie_echo_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/handlers/cookie_echo_h.erl')
-rw-r--r--test/handlers/cookie_echo_h.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/handlers/cookie_echo_h.erl b/test/handlers/cookie_echo_h.erl
new file mode 100644
index 0000000..28c5dde
--- /dev/null
+++ b/test/handlers/cookie_echo_h.erl
@@ -0,0 +1,11 @@
+%% Feel free to use, reuse and abuse the code in this file.
+
+-module(cookie_echo_h).
+
+-export([init/2]).
+
+init(Req, State) ->
+ {ok, cowboy_req:reply(200,
+ #{<<"content-type">> => <<"text/plain">>},
+ cowboy_req:header(<<"cookie">>, Req, <<"UNDEF">>),
+ Req), State}.