Discovering HTTP #1: The Accept header
approval
Rails built-in respond_to functionality explained. Useful for handling the same logic with different output, like building a mobile front-end for your website.\r\n\r\nIt has a nice example of how an API could be set up: XLM in with content type application/xml, auto-parse to post vars and handle as regular form post, XML out as accept-type is application/xml.