Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I suggest using XHTML forms:</p> <pre><code>GET / HTTP/1.1 OK &lt;form method="get" action="/zip_code_search" rel="http://api.addressbook.com/rels/zip_code_search"&gt; &lt;p&gt;Zip code search&lt;/p&gt; &lt;input name="zip_code"/&gt; &lt;/form&gt; GET /zip_code_search?zip_code=02125 HTTP/1.1 303 See Other Location: /zip_code/02125 </code></pre> <p>What's missing in HTML is a <code>rel</code> attribute for <code>form</code>.</p> <p>Check out <a href="http://msdn.microsoft.com/en-us/magazine/dd943053.aspx" rel="nofollow">this article</a>:</p> <blockquote> <p>To summarize, there are several reasons to consider XHTML as the default representation for your RESTful services. First, you can leverage the syntax and semantics for important elements like <code>&lt;a&gt;</code>, <code>&lt;form&gt;</code>, and <code>&lt;input&gt;</code> instead of inventing your own. Second, you'll end up with services that feel a lot like sites because they'll be browsable by both users and applications. The XHTML is still interpreted by a human—it's just a programmer during development instead of a user at runtime. This simplifies things throughout the development process and makes it easier for consumers to learn how your service works. And finally, you can leverage standard Web development frameworks to build your RESTful services.</p> </blockquote> <p>Also check out <a href="http://www.opensearch.org/" rel="nofollow">OpenSearch</a>.</p> <p><hr/> To reduce the number of request consider this response:</p> <pre><code>HTTP/1.1 200 OK Content-Location: /zip_code/02125 &lt;html&gt; &lt;head&gt; &lt;link href="/zip_code/02125/cities" rel="related http://api.addressbook.com/rels/zip_code/cities"/&gt; &lt;/head&gt; ... &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload