Hi all - coming up with a strange problem around t...
# lucee
e
Hi all - coming up with a strange problem around the treatment of remote function arguments - I think I have locused the issue down to our Lucee install (latest) Given a remote cfc (not rest-enabled, just old school access="remote") the following difference between CF2016 and Lucee 5.latest when using FORM data (encoded as
x-www-form-urlencoded
) My code expects an argument of type 'struct' which CF2016 is parsing from raw
getHTTPRequestData().content
Copy code
<cffunction name="setThing" access="remote" output="false" httpMethod="POST" returntype="struct" returnformat="JSON" description="Updates Thing">
        <cfargument name="obj" required="true" type="struct" hint="JSON-parsable object />
Lucee does not transform the
getHTTPRequestData().content
and keeps it as a string, so the call errors out
Copy code
Invalid call of the function [setThing], first Argument [obj] is of invalid type, Cannot cast String [{"a":"Port Jarrett","b":"6235 Dena Dam","c":10036,"d":"Bode Light...] to a value of type [struct]*
Again, CF2016 has no trouble converting the exact same argument/parameter data and I do not need to independently parse it Is this something to do with a server setting I could no longer recall? I certainly would know how to work around it from several angles, but want to know what's up ;)
*note: fake data