diff options
Diffstat (limited to 'examples/rest_basic_auth/src')
-rw-r--r-- | examples/rest_basic_auth/src/toppage_handler.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/rest_basic_auth/src/toppage_handler.erl b/examples/rest_basic_auth/src/toppage_handler.erl index f5544f8..59c5888 100644 --- a/examples/rest_basic_auth/src/toppage_handler.erl +++ b/examples/rest_basic_auth/src/toppage_handler.erl @@ -3,13 +3,13 @@ %% @doc Handler with basic HTTP authorization. -module(toppage_handler). --export([init/3]). +-export([init/2]). -export([content_types_provided/2]). -export([is_authorized/2]). -export([to_text/2]). -init(_Transport, _Req, []) -> - {upgrade, protocol, cowboy_rest}. +init(Req, Opts) -> + {rest, Req, Opts}. is_authorized(Req, State) -> case cowboy_req:parse_header(<<"authorization">>, Req) of |