Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion 02_commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,21 @@ <h3>Processing Model</h3>

<li><p>If <var>response data</var> is an <a>error</a>, <a>send an error</a> with <a>error code</a> equal to <var>response data</var>'s <a>error code<a>.</p>

<p>Otherwise <a>send a response</a> with status 200 and <var>response data</var>'s data.</p></li>
<p>Otherwise <a>send a success response</a> with <var>response data</var>'s data.</p></li>

<li><p>Jump to step 1.</p></li>
</ol>

<p>When required to <dfn>send a success response</dfn> with <var>response data</var>, a remote end must run the following steps:</p>

<ol>
<li><p>Let <var>data</var> be a <a>new JSON Object</a>.</p></li>

<li><p>Set the "value" property of <var>data</var> to be <var>response data</var>.</p></li>

<li><p><a>Send a response</a> with 200 and <var>data</var> as arguments.</p></li>
</ol>

<p>When required to <dfn>send an error</dfn>, with <var>error code</var>, a remote end must run the following steps:</p>

<ol>
Expand Down