aboutsummaryrefslogtreecommitdiffstats
path: root/examples/compress_response/src/toppage_handler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/compress_response/src/toppage_handler.erl')
-rw-r--r--examples/compress_response/src/toppage_handler.erl6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/compress_response/src/toppage_handler.erl b/examples/compress_response/src/toppage_handler.erl
index 09c8689..4631f71 100644
--- a/examples/compress_response/src/toppage_handler.erl
+++ b/examples/compress_response/src/toppage_handler.erl
@@ -4,12 +4,8 @@
-module(toppage_handler).
-export([init/2]).
--export([handle/2]).
init(Req, Opts) ->
- {http, Req, Opts}.
-
-handle(Req, State) ->
BigBody =
<<"A cowboy is an animal herder who tends cattle on ranches in North America,
traditionally on horseback, and often performs a multitude of other ranch-
@@ -24,4 +20,4 @@ considerable respect for their achievements. There are also cattle handlers
in many other parts of the world, particularly South America and Australia,
who perform work similar to the cowboy in their respective nations.\n">>,
Req2 = cowboy_req:reply(200, [], BigBody, Req),
- {ok, Req2, State}.
+ {ok, Req2, Opts}.