aboutsummaryrefslogtreecommitdiffstats
path: root/guide/rest_handlers.md
diff options
context:
space:
mode:
Diffstat (limited to 'guide/rest_handlers.md')
-rw-r--r--guide/rest_handlers.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/guide/rest_handlers.md b/guide/rest_handlers.md
index 87991a0..92b0bc5 100644
--- a/guide/rest_handlers.md
+++ b/guide/rest_handlers.md
@@ -10,8 +10,9 @@ The REST handler is the recommended way to handle requests.
Initialization
--------------
-Like Websocket, REST is a sub-protocol of HTTP. It therefore
-requires a protocol upgrade.
+First, the `init/3` callback is called. This callback is common
+to all handlers. To use REST for the current request, this function
+must return an `upgrade` tuple.
``` erlang
init({tcp, http}, Req, Opts) ->