Share via


MySpace, and Content-Type Negotiation in REST using WCF

Hah!   followup on a hot topic. I posted earlier on content-type negotiation in REST with WCF.  

My buddy Vittorio wrote about MySpace's kiss-and-tell episode at Mix08.  MySpace has exposed a REST interface for the MySpace resources - see https://developer.myspace.com for more info - and the designers talked about their experience at the MIX08 conference this month. Cool!

But here's the thing - MySpace wanted to support different content types for the same resource.  Rather than employ Accept headers for content-type negotiation, MySpace elected to use a different URL for a different content-type, on the same resource.  So if you want a representation in JSON, then you tickle a URL that ends in .json.  If you want plain old XML, then you use a URL that ends in .xml. 

That's one vote, in favor of my viewpoint.   Hah!

This doesn't settle anything, of course, except that, I'm right again.

Also, one more API to be added to Hanselman's list.