On 1/2/07, Michael Peters <suppressed> wrote:
> As I said to him when we had our IRC conversation that day, the main bit > that is missing is dispatch based on MIME types. Well, it lacks being able to dispatch on HTTP request method too. I'm confused about the MIME types bit though. I don't seem to remember how they are associated with REST.
The idea is that one end point and return a representation of itself
in different formats based on the HTTP Accept header. This is referred
to as content negotiation or "conneg" in REST parlance.
GET /people
=> return HTML
Accept: text/javascript
GET /people
=>return JSON
Accept: text/xml
GET /people
=> return XML
The above example assumes HTML is the default response. That doesn't
necessarily have to be the case. Also using other MIME's like
application/xml+atom you could return different XML formats.
If you can read Ruby code the slide DDH posted with the blog entry I
referenced has some examples on how its being implemented in Rails in
addition for the case for native support of REST.
<tim/>
--
Timothy Appnel
Appnel Solutions
http://appnel.com/
Blogcast / Powerful blogging systems made easy
http://blogcast.net/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.