aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/rest_handlers.ezdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/guide/rest_handlers.ezdoc')
-rw-r--r--doc/src/guide/rest_handlers.ezdoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/guide/rest_handlers.ezdoc b/doc/src/guide/rest_handlers.ezdoc
index e09790a..e6bb092 100644
--- a/doc/src/guide/rest_handlers.ezdoc
+++ b/doc/src/guide/rest_handlers.ezdoc
@@ -13,8 +13,8 @@ to all handlers. To use REST for the current request, this function
must return a `cowboy_rest` tuple.
``` erlang
-init(Req, Opts) ->
- {cowboy_rest, Req, Opts}.
+init(Req, _Opts) ->
+ {cowboy_rest, Req, #state{}}.
```
Cowboy will then switch to the REST protocol and start executing