From fd3c40c7ee7d5efdd75481876e457e723e4b4e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 25 Jun 2014 11:23:58 +0200 Subject: Wrap-up the user guide --- guide/rest_handlers.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guide/rest_handlers.md') 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) -> -- cgit v1.2.3