Erik Jespersen
03/16/2023, 5:35 PMx-www-form-urlencoded)
My code expects an argument of type 'struct' which CF2016 is parsing from raw getHTTPRequestData().content
<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
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