aboutsummaryrefslogtreecommitdiffstats
path: root/examples/chunked_hello_world/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/chunked_hello_world/src')
-rw-r--r--examples/chunked_hello_world/src/toppage_handler.erl6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/chunked_hello_world/src/toppage_handler.erl b/examples/chunked_hello_world/src/toppage_handler.erl
index 6b47156..cb1d130 100644
--- a/examples/chunked_hello_world/src/toppage_handler.erl
+++ b/examples/chunked_hello_world/src/toppage_handler.erl
@@ -4,16 +4,12 @@
-module(toppage_handler).
-export([init/2]).
--export([handle/2]).
init(Req, Opts) ->
- {http, Req, Opts}.
-
-handle(Req, State) ->
Req2 = cowboy_req:chunked_reply(200, Req),
cowboy_req:chunk("Hello\r\n", Req2),
timer:sleep(1000),
cowboy_req:chunk("World\r\n", Req2),
timer:sleep(1000),
cowboy_req:chunk("Chunked!\r\n", Req2),
- {ok, Req2, State}.
+ {ok, Req2, Opts}.