0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00

Partial update of the user guide

I will do more breaking changes before documenting more.
This commit is contained in:
Loïc Hoguin 2016-05-24 14:50:27 +02:00
parent 25912dfc05
commit b5a40256dd
9 changed files with 199 additions and 273 deletions

View file

@ -1,6 +1,8 @@
[[loop_handlers]]
== Loop handlers
// @todo This description needs to be updated.
Loop handlers are a special kind of HTTP handlers used when the
response can not be sent right away. The handler enters instead
a receive loop waiting for the right message before it can send
@ -64,8 +66,8 @@ message otherwise.
[source,erlang]
----
info({reply, Body}, Req, State) ->
Req2 = cowboy_req:reply(200, [], Body, Req),
{stop, Req2, State};
cowboy_req:reply(200, [], Body, Req),
{stop, Req, State};
info(_Msg, Req, State) ->
{ok, Req, State, hibernate}.
----