I am using taffy and am passing an unknown query string to a function. I do not know the query string values passed in advance, so I am trying to use that in the function but it is not working. Please point me to right direction.
Here is my code:
<cffunction name="qrystringToStruct" returntype="any">
<cfargument name="myStruct" default="#structNew()#" type="struct">
<cfargument name="str" required="true" default="">
<cfscript>
for(i=1; i LTE listLen(arguments.str,'&');i=i+1) {
structInsert(myStruct, i, listGetAt(arguments.str,i,'&'));
}
</cfscript>
<cfreturn myStruct>
</cffunction>
<cffunction name="getCourseById" taffy:verb="get" taffy:docs:hide>
<cfargument name="structurl" type="any" default="" />
<cfdump var="#structurl#">
<cfdump var="#qrystringToStruct(structurl)#" abort>
<cfset var local = {} />
This is how I am calling the url:
http://localhost:9002/taffy/index.cfm//coursesMethods?credits=3&coursetitle=power
but all I am getting is [empty string]