I'm back at the conneg/view changes this morning and want to start the conversation about our default conventions for attaching input and output options on BehaviorChain's.
For a *new* default conventions:
* Any endpoint that responds to any Http verb besides GET will accept and output Json if it has no other kind of output
Today, we've got:
* Actions that return strings write
plain/text
* Actions that return strings but the method is suffixed by "Html" write text/html
* Actions that return HtmlTag or HtmlDocument write text/html
* Actions that return AjaxContinuation or any subclass of AjaxContinuation write json (it's a little bit special)
* Actions where either the input or output type implements the JsonMessage interface will write text/json or application/json and accept text/json, application/json, or application/x-www-form-urlencoded (Asymmetric Json)
* Explicitly,
Actions marked with:
[JsonOutput] -- writes text/json or application/json. Has no effect on intputs
[AsymmetricJson] -- http posts and json in, json out
[SymmetricJson] -- json in, json out
[Conneg] -- configurable for one offs
and finally, you can also explicitly do:
Media.ApplyConneg(filter) that today will just add xml, json, http in, xml json out.
I'm nuking the complete "Output.ToXXXXXXX" syntax in FubuRegistry with the idea that the Media hive will take up the slack.
Thoughts?
Jeremy D. MillerThe Shade Tree Developerjeremy...@yahoo.com