<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>esjewett.com - Latest Comments in A RESTful ESME API</title><link>http://esjewett.disqus.com/</link><description></description><atom:link href="https://esjewett.disqus.com/a_restful_esme_api/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 15 Feb 2009 09:06:27 -0000</lastBuildDate><item><title>Re: A RESTful ESME API</title><link>http://www.esjewett.com/blog/a-restful-esme-api#comment-6274108</link><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;p&gt;I agree with you on the format issue.  I'm partial to the id.format approach.  That's not really a component of REST vs. RPC though, so I thought I'd leave it out for simplicity.  If we're talking about fully specifying an API then it needs to go in, for sure.&lt;/p&gt;&lt;p&gt;I'm not very familiar with how long-polling works.  I assume that we need to communicate to the server that it needs to keep the connection open for some period of time.  There are two ways I can think of communicating this need without creating a separate API resource.&lt;/p&gt;&lt;p&gt;You could use an extra parameter in the GET request to tell the server that you wanted to long-poll, or to specify some sort of time-out (?timeout=5min).  This isn't very RESTful since this parameter isn't really an attribute of the resource.&lt;/p&gt;&lt;p&gt;You could also use the HTTP If-Modified-Since header to specify a time a few minutes in the future.  This would require client and server clocks to be synced up, and the server would have to be smart enough to figure out that future=long-polling.&lt;/p&gt;&lt;p&gt;Yes, I stole both of these ideas from the Twitter API (&lt;a href="http://apiwiki.twitter.com/REST+API+Documentation#HTTPHeaders)" rel="nofollow noopener" target="_blank" title="http://apiwiki.twitter.com/REST+API+Documentation#HTTPHeaders)"&gt;http://apiwiki.twitter.com/...&lt;/a&gt;.  I'd be interested in if there are other options.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">esjewett</dc:creator><pubDate>Sun, 15 Feb 2009 09:06:27 -0000</pubDate></item><item><title>Re: A RESTful ESME API</title><link>http://www.esjewett.com/blog/a-restful-esme-api#comment-6274075</link><description>&lt;p&gt;Right, the fact that I'm not an expert at this stuff shows, doesn't it? :-)  You and Richard are exactly right that it's "DELETE" and "PUT" instead of "DESTROY" and "UPDATE".  I'll make the change.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">esjewett</dc:creator><pubDate>Sun, 15 Feb 2009 09:01:15 -0000</pubDate></item><item><title>Re: A RESTful ESME API</title><link>http://www.esjewett.com/blog/a-restful-esme-api#comment-6272660</link><description>&lt;p&gt;Great blog.&lt;/p&gt;&lt;p&gt;One question: how would you distinguish between long-polling and normal GET api/users/USERID/messages call?&lt;/p&gt;&lt;p&gt;Format is also an issue. Yammer uses "id.format" (&lt;a href="http://www.yammer.com/api_doc.html)" rel="nofollow noopener" target="_blank" title="http://www.yammer.com/api_doc.html)"&gt;http://www.yammer.com/api_d...&lt;/a&gt; to determine the format - which is a good idea in my opinion.&lt;/p&gt;&lt;p&gt;Instead of DESTROY, use "DELETE". Instead of "UPDATE" use "PUT".&lt;/p&gt;&lt;p&gt;D. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dick Hirsch</dc:creator><pubDate>Sun, 15 Feb 2009 04:49:45 -0000</pubDate></item><item><title>Re: A RESTful ESME API</title><link>http://www.esjewett.com/blog/a-restful-esme-api#comment-6270781</link><description>&lt;p&gt;Very nice, way to go !&lt;/p&gt;&lt;p&gt;(but there are no DESTROY or UPDATE methods in HTTP &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html)" rel="nofollow noopener" target="_blank" title="http://www.w3.org/Protocols/rfc2616/rfc2616.html)"&gt;http://www.w3.org/Protocols...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Don't forget to provide a service document (à la AtomPub) and then to provide hyperlinks between the various representations, thus an HTTP client would simply "enter the API" via the service document and then discover via the links (rel="xxx") the various services available.&lt;/p&gt;&lt;p&gt;Actually links are more important than URI hierarchies (it took me a while to understand).&lt;/p&gt;&lt;p&gt;Best regards,&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jmettraux</dc:creator><pubDate>Sun, 15 Feb 2009 01:13:09 -0000</pubDate></item></channel></rss>