diff options
author | Loïc Hoguin <[email protected]> | 2016-08-10 17:15:02 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-10 17:15:02 +0200 |
commit | e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 (patch) | |
tree | 5eb48865b2ad61d3c05bdc0e3e1f639a6b966ffe /examples/chunked_hello_world/src/toppage_handler.erl | |
parent | aa6f2ab5a48d90e47648dfb53e0894dcaa6f6aac (diff) | |
download | cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.gz cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.tar.bz2 cowboy-e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4.zip |
Make reply functions return Req
Diffstat (limited to 'examples/chunked_hello_world/src/toppage_handler.erl')
-rw-r--r-- | examples/chunked_hello_world/src/toppage_handler.erl | 4 |
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), |