0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Make reply functions return Req

This commit is contained in:
Loïc Hoguin 2016-08-10 17:15:02 +02:00
parent aa6f2ab5a4
commit e30d120bd8
16 changed files with 109 additions and 108 deletions

View file

@ -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),