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

-module(push_h).

-export([init/2]).

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