Is there a mechanism or accepted approach for responding to requests that have a more complicated format extension?
My specific scenario involves returning a plist file. However, I need to sometimes return this file as an XML plist file and sometimes as a binary plist file.
I thought that URLs composed like /resources.xml.plist and /resources.binary.plist would be a nice way to distinguish between them. I’d then need to add a MIME type for binary.plist and one for xml.plist and then somehow respond_to these formats.
Does any one know how this might be accomplished and/or have ideas for a nicer approach?
Take a look at tutorial “Using custom mime types“.