News for hackers. Stuff that matters.
Re:Nobody Understands REST or HTTP by scott_w on Sunday February 26, 2012 @11:46AM (#3635986)
Custom verbs aren't really necessary. You can do some of your "method" naming in the URI. One example could be: /sum?number=1&number=2 which, when a GET is issued, will return a representation of 3.

If you need to perform some action that can be expected to take time, you can issue a POST request, which can give you a new resource that reports back on its current state. An example could be: POST /printer with the request body containing the document to print. It could assign a URI that tells you the status of the document (location in queue) and you can DELETE it if you no longer want to print the document.

There are no comments on this comment yet.