aboutsummaryrefslogtreecommitdiffstats
path: root/examples/chunked_hello_world
diff options
context:
space:
mode:
Diffstat (limited to 'examples/chunked_hello_world')
-rw-r--r--examples/chunked_hello_world/src/toppage_handler.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/chunked_hello_world/src/toppage_handler.erl b/examples/chunked_hello_world/src/toppage_handler.erl
index d492d95..3865698 100644
--- a/examples/chunked_hello_world/src/toppage_handler.erl
+++ b/examples/chunked_hello_world/src/toppage_handler.erl
@@ -5,8 +5,8 @@
-export([init/2]).
-init(Req, Opts) ->
- cowboy_req:stream_reply(200, Req),
+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),