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

-module(http_handler).

-export([init/2]).
-export([handle/2]).

init(Req, Opts) ->
	{http, Req, Opts}.

handle(Req, State) ->
	Headers = proplists:get_value(headers, State, []),
	Body = proplists:get_value(body, State, "http_handler"),
	{ok, cowboy_req:reply(200, Headers, Body, Req), State}.