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.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/chunked_hello_world/src/toppage_handler.erl b/examples/chunked_hello_world/src/toppage_handler.erl
index 906f292..0838832 100644
--- a/examples/chunked_hello_world/src/toppage_handler.erl
+++ b/examples/chunked_hello_world/src/toppage_handler.erl
@@ -11,12 +11,12 @@ init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
- {ok, Req2} = cowboy_http_req:chunked_reply(200, Req),
- ok = cowboy_http_req:chunk("Hello\r\n", Req2),
+ {ok, Req2} = cowboy_req:chunked_reply(200, Req),
+ ok = cowboy_req:chunk("Hello\r\n", Req2),
ok = timer:sleep(1000),
- ok = cowboy_http_req:chunk("World\r\n", Req2),
+ ok = cowboy_req:chunk("World\r\n", Req2),
ok = timer:sleep(1000),
- ok = cowboy_http_req:chunk("Chunked!\r\n", Req2),
+ ok = cowboy_req:chunk("Chunked!\r\n", Req2),
{ok, Req2, State}.
terminate(_Req, _State) ->