RESTful API and a Web Site in the Same URL
yegor256.com
yegor256.com
-Edit I don’t mean this specific implementation using XSLT, I mean serving html, xml, json, csv, etc data from the same url -/Edit
The article makes mention of using XSLT (which basically means your "api" is only usable as XML) but it's so much simpler than that.
This type of thing is exactly what the HTTP Accepts header is for. The client says it accepts "application/json" you return a json encoded result. The client says it accepts "application/xml", you send an XML result. The client says it accepts text/html, you send an HTML result.