aboutsummaryrefslogtreecommitdiffstats
path: root/guide/rest_handlers.md
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-06-25 11:23:58 +0200
committerLoïc Hoguin <[email protected]>2014-06-25 11:23:58 +0200
commitfd3c40c7ee7d5efdd75481876e457e723e4b4e20 (patch)
treebbe0880196f81daa29d43954b2e774810353c108 /guide/rest_handlers.md
parent642630fea10490e3bbe214652142c51c7787de46 (diff)
downloadcowboy-fd3c40c7ee7d5efdd75481876e457e723e4b4e20.tar.gz
cowboy-fd3c40c7ee7d5efdd75481876e457e723e4b4e20.tar.bz2
cowboy-fd3c40c7ee7d5efdd75481876e457e723e4b4e20.zip
Wrap-up the user guide
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) ->