Hacker News new | ask | show | jobs
by u801e 2184 days ago
IMAP has many more verbs compared to HTTP, so wouldn't it be a better application layer protocol compared to HTTP for a REST API?
2 comments

REST doesn't care about the size of the set of verbs, only that the set be constant. HTTP as one particular implementation of REST just happens to have nine verbs.

I tried to implement an IMAP server a few years ago, but otherwise I don't know much about it. However, I do recall that Mark Crispin admitted that he wasn't a very good API designer, and that much of the complexity of IMAP was due to it being intertwined with the complexity of MIME. But, I can't find the sources for those claims at the moment.

For normal SPA JavaScript/TypeScript browser-based apps, I like the conventional approach of an HTTP "post" for every API call. You send JSON upstream and you get a JSON response back. Basically it's an Ajax call that gets data back to use to update the page.