Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think <a href="http://bitworking.org/projects/atom/rfc5023.html#crwp" rel="noreferrer">atompub REST API</a> is a great example of a restful service. See the snippet below from the atompub spec:</p> <pre><code>POST /edit/ HTTP/1.1 Host: example.org User-Agent: Thingio/1.0 Authorization: Basic ZGFmZnk6c2VjZXJldA== Content-Type: application/atom+xml;type=entry Content-Length: nnn Slug: First Post &lt;?xml version="1.0"?&gt; &lt;entry xmlns="http://www.w3.org/2005/Atom"&gt; &lt;title&gt;Atom-Powered Robots Run Amok&lt;/title&gt; &lt;id&gt;urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a&lt;/id&gt; &lt;updated&gt;2003-12-13T18:30:02Z&lt;/updated&gt; &lt;author&gt;&lt;name&gt;John Doe&lt;/name&gt;&lt;/author&gt; &lt;content&gt;Some text.&lt;/content&gt; &lt;/entry&gt; </code></pre> <p>The server signals a successful creation with a status code of 201. The response includes a Location header indicating the Member Entry URI of the Atom Entry, and a representation of that Entry in the body of the response. </p> <pre><code>HTTP/1.1 201 Created Date: Fri, 7 Oct 2005 17:17:11 GMT Content-Length: nnn Content-Type: application/atom+xml;type=entry;charset="utf-8" Location: http://example.org/edit/first-post.atom ETag: "c180de84f991g8" &lt;?xml version="1.0"?&gt; &lt;entry xmlns="http://www.w3.org/2005/Atom"&gt; &lt;title&gt;Atom-Powered Robots Run Amok&lt;/title&gt; &lt;id&gt;urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a&lt;/id&gt; &lt;updated&gt;2003-12-13T18:30:02Z&lt;/updated&gt; &lt;author&gt;&lt;name&gt;John Doe&lt;/name&gt;&lt;/author&gt; &lt;content&gt;Some text.&lt;/content&gt; &lt;link rel="edit" href="http://example.org/edit/first-post.atom"/&gt; &lt;/entry&gt; </code></pre> <p>The Entry created and returned by the Collection might not match the Entry POSTed by the client. A server MAY change the values of various elements in the Entry, such as the atom:id, atom:updated, and atom:author values, and MAY choose to remove or add other elements and attributes, or change element content and attribute values.</p>
 

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