aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ssl_hello_world
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ssl_hello_world')
-rw-r--r--examples/ssl_hello_world/src/toppage_handler.erl10
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/ssl_hello_world/src/toppage_handler.erl b/examples/ssl_hello_world/src/toppage_handler.erl
index 80fe1d5..18a6343 100644
--- a/examples/ssl_hello_world/src/toppage_handler.erl
+++ b/examples/ssl_hello_world/src/toppage_handler.erl
@@ -3,18 +3,14 @@
%% @doc Hello world handler.
-module(toppage_handler).
--export([init/3]).
+-export([init/2]).
-export([handle/2]).
--export([terminate/3]).
-init(_Transport, Req, []) ->
- {ok, Req, undefined}.
+init(Req, Opts) ->
+ {http, Req, Opts}.
handle(Req, State) ->
Req2 = cowboy_req:reply(200, [
{<<"content-type">>, <<"text/plain">>}
], <<"Hello world!">>, Req),
{ok, Req2, State}.
-
-terminate(_Reason, _Req, _State) ->
- ok.