aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/delayed_hello_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/handlers/delayed_hello_h.erl')
-rw-r--r--test/handlers/delayed_hello_h.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/handlers/delayed_hello_h.erl b/test/handlers/delayed_hello_h.erl
new file mode 100644
index 0000000..68ef1ad
--- /dev/null
+++ b/test/handlers/delayed_hello_h.erl
@@ -0,0 +1,11 @@
+%% Feel free to use, reuse and abuse the code in this file.
+
+-module(delayed_hello_h).
+
+-export([init/2]).
+
+init(Req, Timeout) ->
+ timer:sleep(Timeout),
+ {ok, cowboy_req:reply(200, #{
+ <<"content-type">> => <<"text/plain">>
+ }, <<"Hello world!">>, Req), Timeout}.