Dynamic Parameters for a CFHTTP POST Request


i need call service using cfhttp (post) parameters passed service dynamic there no way create static list of cfhttpparam tags. actually, there static parameters there dynamic parameters included in request based on values defined static parameters.

my question how pass form data in cfhttp post request when parameters passed not known in advance? see there type attribute cfhttpparam tag of "head" , "body" thinking might possible manually build data passed, proper way pass form parameters if construct "head" , "body" data myself?


what wrong dynamic <cfhttpparam...> tags. why exist.

<cfset foo = structnew()>
<cfset foo.joe = "avalue">
<cfset foo.bob = "bvalue">

<cfhttp ...>
<cfloop collection="#foo#" item="bar">
<cfhttpparam name="#bar#" value="#foo[bar]#">
</cfloop>
</cfhttp>


More discussions in Advanced Techniques


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support