diff options
author | Loïc Hoguin <[email protected]> | 2020-03-11 19:45:16 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-03-12 18:08:16 +0100 |
commit | 87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3 (patch) | |
tree | 5b381d3d2c2f691699baeddad78c781026d237b7 /test/handlers/cookie_echo_h.erl | |
parent | 04790d3a281a42fbd65c9a44fe88f437cfe025f3 (diff) | |
download | gun-87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3.tar.gz gun-87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3.tar.bz2 gun-87d0bfff926892d2dc0a55a3dc45d8c5f8a682f3.zip |
Make Gun use the cookie store when configured to
Diffstat (limited to 'test/handlers/cookie_echo_h.erl')
-rw-r--r-- | test/handlers/cookie_echo_h.erl | 11 |
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}. |