dudeswave2/gun/test/handlers/cookie_echo_h.erl

12 lines
268 B
Erlang
Raw Normal View History

%% 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}.