Hacker News new | ask | show | jobs
by clintjhill 5466 days ago
Content Negotiation is a critical part of REST APIs and it's my observation that most simply ignore or default to JSON in all cases. Good REST APIs allow the client to "choose" the mime type. Without this part of REST - you have no "representational".

On that topic, to rely on an 'Accept' header is pretty risky. That presumes the client will always have control over the headers. It is in my opinion always wiser to make the API determine mime type by extension (.html, .xml, .json etc).

1 comments

Was there something particularly wrong about my comment(s) here? Seems I was down voted on all 3.