Weird behavior of cfc defined using shorthand:
component {
remote string function get() httpmethod="GET" returnformat="plain" {
return "hello world";
}
}
compared to expected behavior defined this way:
<cfcomponent>
<cffunction name="get" access="remote" returntype="String" httpmethod="GET">
<cfreturn "hello world">
</cffunction>
</cfcomponent>
The 2nd example called as a REST service correctly returns hello world
The 1st example however returns hello world but ALSO appends the entire component's .cfc code as follows:
hello worldcomponent { remote string function get() { return "hello world"; } }
Any ideas anybody what could be causing this? I'm stumped. Thks