Is it possible to determine/set mimetype for CFC-generated content?
In short, my onCFCRequest() method makes a manual invokation of the component and sends it the arguments.
Let's say, for example, I am calling a component located at www.coms.template
Is it possible for me to do something in a method called in that template component so that when it returns the generated content and we are now back in the onCFCRequest() method, that I can look at the generated content and determine/set/serve the appropriate mimetype?
My methods can generate JSON, WDDX, CSS, Javascript and HTML, and I want to make sure they serve as the appropriate mimetypes when their content is sent to the browser:
- JSON = text/json
- WDDX = text/xml
- Javascript = application/x-javascript
- CSS = text/css
- HTML = text/html
- Other = text/plain
