aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/inform_h.erl
blob: f62b31fe72117dd07d06c61ba9908a762be495c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%% Feel free to use, reuse and abuse the code in this file.

-module(inform_h).

-export([init/2]).

init(Req, State) ->
	cowboy_req:inform(103, #{
		<<"content-type">> => <<"text/plain">>
	}, Req),
	cowboy_req:inform(103, #{
		<<"content-type">> => <<"text/plain">>
	}, Req),
	{ok, cowboy_req:reply(200, #{
		<<"content-type">> => <<"text/plain">>
	}, <<"Hello world!">>, Req), State}.