aboutsummaryrefslogtreecommitdiffstats
path: root/examples/chunked_hello_world/src/toppage_handler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/chunked_hello_world/src/toppage_handler.erl')
-rw-r--r--examples/chunked_hello_world/src/toppage_handler.erl15
1 files changed, 0 insertions, 15 deletions
diff --git a/examples/chunked_hello_world/src/toppage_handler.erl b/examples/chunked_hello_world/src/toppage_handler.erl
deleted file mode 100644
index 3865698..0000000
--- a/examples/chunked_hello_world/src/toppage_handler.erl
+++ /dev/null
@@ -1,15 +0,0 @@
-%% Feel free to use, reuse and abuse the code in this file.
-
-%% @doc Chunked hello world handler.
--module(toppage_handler).
-
--export([init/2]).
-
-init(Req0, Opts) ->
- Req = cowboy_req:stream_reply(200, Req0),
- cowboy_req:stream_body("Hello\r\n", nofin, Req),
- timer:sleep(1000),
- cowboy_req:stream_body("World\r\n", nofin, Req),
- timer:sleep(1000),
- cowboy_req:stream_body("Chunked!\r\n", fin, Req),
- {ok, Req, Opts}.