Solved

Can I evaluate a variable in the value attribute of <cfhttpparam>?

Posted on 2016-11-30
2
6 Views
Last Modified: 2016-11-30
Example:

<cfhttpparam type="header" name="code" value="#URL.code#">

Will this actually evaluate the code from the URL parameter?
0
Comment
Question by:Brian Coughter
2 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
Comment Utility
Yep. There are a few exceptions, but for the most part, any CFML variable within a CF tag (cfquery, cfhttpparam, etc...) will be automatically evaluated.

You can see it in action, by creating two test pages. Run test.cfm and you'll see the value of the header "code" is "Some Value Here"

test.cfm
<cfset url.code = "Some Value Here">
<cfhttp url="http://yourserver.com/action.cfm">
	<cfhttpparam type="header" name="code" value="#URL.code#">
</cfhttp>
<cfoutput>#cfhttp.fileContent#</cfoutput>

Open in new window

action.cfm
<!--- display request data including headers --->
<cfdump var="#GetHttpRequestData()#">

Open in new window

1
 

Author Closing Comment

by:Brian Coughter
Comment Utility
Thank you
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now