- afb_req_context_set(req, NULL, NULL);
-}
-</code></pre>
-
-<a name="Sending.the.reply.to.a.request"></a>
-<h3>Sending the reply to a request</h3>
-
-<p>Two kinds of replies can be made: successful replies and
-failure replies.</p>
-
-<blockquote><p>Sending a reply to a request must be done at most one time.</p></blockquote>
-
-<p>The two functions to send a reply of kind “success” are
-<strong>afb_req_success</strong> and <strong>afb_req_success_f</strong>.</p>
-
-<pre><code>/*
- * Sends a reply of kind success to the request 'req'.
- * The status of the reply is automatically set to "success".
- * Its send the object 'obj' (can be NULL) with an
- * informationnal comment 'info (can also be NULL).
- *
- * For conveniency, the function calls 'json_object_put' for 'obj'.
- * Thus, in the case where 'obj' should remain available after
- * the function returns, the function 'json_object_get' shall be used.
- */
-void afb_req_success(struct afb_req req, struct json_object *obj, const char *info);
-
-/*
- * Same as 'afb_req_success' but the 'info' is a formatting
- * string followed by arguments.
- *
- * For conveniency, the function calls 'json_object_put' for 'obj'.
- * Thus, in the case where 'obj' should remain available after
- * the function returns, the function 'json_object_get' shall be used.
- */
-void afb_req_success_f(struct afb_req req, struct json_object *obj, const char *info, ...);
-</code></pre>
-
-<p>The two functions to send a reply of kind “failure” are
-<strong>afb_req_fail</strong> and <strong>afb_req_fail_f</strong>.</p>
-
-<pre><code>/*
- * Sends a reply of kind failure to the request 'req'.
- * The status of the reply is set to 'status' and an
- * informationnal comment 'info' (can also be NULL) can be added.
- *
- * Note that calling afb_req_fail("success", info) is equivalent
- * to call afb_req_success(NULL, info). Thus even if possible it
- * is strongly recommanded to NEVER use "success" for status.
- *
- * For conveniency, the function calls 'json_object_put' for 'obj'.
- * Thus, in the case where 'obj' should remain available after
- * the function returns, the function 'json_object_get' shall be used.
- */
-void afb_req_fail(struct afb_req req, const char *status, const char *info);
-
-/*
- * Same as 'afb_req_fail' but the 'info' is a formatting
- * string followed by arguments.
- *
- * For conveniency, the function calls 'json_object_put' for 'obj'.
- * Thus, in the case where 'obj' should remain available after
- * the function returns, the function 'json_object_get' shall be used.
- */
-void afb_req_fail_f(struct afb_req req, const char *status, const char *info, ...);
-</code></pre>
-
-<blockquote><p>For conveniency, these functions call <strong>json_object_put</strong> to release the object <strong>obj</strong>
-that they send. Then <strong>obj</strong> can not be used after calling one of these reply functions.
-When it is not the expected behaviour, calling the function <strong>json_object_get</strong> on the object <strong>obj</strong>
-before cancels the effect of <strong>json_object_put</strong>.</p></blockquote>
-
-<a name="Getting.argument.of.invocation"></a>
-<h2>Getting argument of invocation</h2>
-
-<p>Many verbs expect arguments. Afb-daemon let plugins
-retrieve their arguments by name not by position.</p>
-
-<p>Arguments are given by the requests either through HTTP
-or through WebSockets.</p>
-
-<p>For example, the verb <strong>join</strong> of the plugin <strong>tic-tac-toe</strong>
-expects one argument: the <em>boardid</em> to join. Here is an extract:</p>
-
-<pre><code>/*
- * Join a board
- */
-static void join(struct afb_req req)
+ afb_req_context_set(req, NULL, NULL);
+}</code></pre>
+<h3 id="sending-reply-to-a-request">Sending reply to a request</h3>
+<p>Two kinds of replies: successful or failure.</p>
+<blockquote>
+<p>Sending a reply to a request MUST be done once and only once.</p>
+</blockquote>
+<p>It exists two functions for "success" replies: <strong>afb_req_success</strong> and <strong>afb_req_success_f</strong>.</p>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
+<span class="co"> * Sends a reply of kind success to the request 'req'.</span>
+<span class="co"> * The status of the reply is automatically set to "success".</span>
+<span class="co"> * Its send the object 'obj' (can be NULL) with an</span>
+<span class="co"> * informationnal comment 'info (can also be NULL).</span>
+<span class="co"> *</span>
+<span class="co"> * For conveniency, the function calls 'json_object_put' for 'obj'.</span>
+<span class="co"> * Thus, in the case where 'obj' should remain available after</span>
+<span class="co"> * the function returns, the function 'json_object_get' shall be used.</span>
+<span class="co"> */</span>
+<span class="dt">void</span> afb_req_success(<span class="kw">struct</span> afb_req req, <span class="kw">struct</span> json_object *obj, <span class="dt">const</span> <span class="dt">char</span> *info);
+
+<span class="co">/*</span>
+<span class="co"> * Same as 'afb_req_success' but the 'info' is a formatting</span>
+<span class="co"> * string followed by arguments.</span>
+<span class="co"> *</span>
+<span class="co"> * For conveniency, the function calls 'json_object_put' for 'obj'.</span>
+<span class="co"> * Thus, in the case where 'obj' should remain available after</span>
+<span class="co"> * the function returns, the function 'json_object_get' shall be used.</span>
+<span class="co"> */</span>
+<span class="dt">void</span> afb_req_success_f(<span class="kw">struct</span> afb_req req, <span class="kw">struct</span> json_object *obj, <span class="dt">const</span> <span class="dt">char</span> *info, ...);</code></pre>
+<p>It exists two functions for "failure" replies: <strong>afb_req_fail</strong> and <strong>afb_req_fail_f</strong>.</p>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
+<span class="co"> * Sends a reply of kind failure to the request 'req'.</span>
+<span class="co"> * The status of the reply is set to 'status' and an</span>
+<span class="co"> * informational comment 'info' (can also be NULL) can be added.</span>
+<span class="co"> *</span>
+<span class="co"> * Note that calling afb_req_fail("success", info) is equivalent</span>
+<span class="co"> * to call afb_req_success(NULL, info). Thus even if possible it</span>
+<span class="co"> * is strongly recommended to NEVER use "success" for status.</span>
+<span class="co"> *</span>
+<span class="co"> * For conveniency, the function calls 'json_object_put' for 'obj'.</span>
+<span class="co"> * Thus, in the case where 'obj' should remain available after</span>
+<span class="co"> * the function returns, the function 'json_object_get' shall be used.</span>
+<span class="co"> */</span>
+<span class="dt">void</span> afb_req_fail(<span class="kw">struct</span> afb_req req, <span class="dt">const</span> <span class="dt">char</span> *status, <span class="dt">const</span> <span class="dt">char</span> *info);
+
+<span class="co">/*</span>
+<span class="co"> * Same as 'afb_req_fail' but the 'info' is a formatting</span>
+<span class="co"> * string followed by arguments.</span>
+<span class="co"> *</span>
+<span class="co"> * For conveniency, the function calls 'json_object_put' for 'obj'.</span>
+<span class="co"> * Thus, in the case where 'obj' should remain available after</span>
+<span class="co"> * the function returns, the function 'json_object_get' shall be used.</span>
+<span class="co"> */</span>
+<span class="dt">void</span> afb_req_fail_f(<span class="kw">struct</span> afb_req req, <span class="dt">const</span> <span class="dt">char</span> *status, <span class="dt">const</span> <span class="dt">char</span> *info, ...);</code></pre>
+<blockquote>
+<p>For conveniency, these functions automatically call <strong>json_object_put</strong> to release <strong>obj</strong>. Because <strong>obj</strong> usage count is null after being passed to a reply function, it SHOULD not be used anymore. If exceptionally <strong>obj</strong> needs to remain usable after reply function then using <strong>json_object_get</strong> on <strong>obj</strong> to increase usage count and cancels the effect the <strong>json_object_put</strong> is possible.</p>
+</blockquote>
+<h2 id="getting-argument-of-invocation">Getting argument of invocation</h2>
+<p>Many methods expect arguments. Afb-daemon's plugins retrieve arguments by name and not by position.</p>
+<p>Arguments are passed by requests through either HTTP or WebSockets.</p>
+<p>For example, the method <strong>join</strong> of plugin <strong>tic-tac-toe</strong> expects one argument: the <em>boardid</em> to join. Here is an extract:</p>
+<pre class="sourceCode c"><code class="sourceCode c"><span class="co">/*</span>
+<span class="co"> * Join a board</span>
+<span class="co"> */</span>
+<span class="dt">static</span> <span class="dt">void</span> join(<span class="kw">struct</span> afb_req req)