Solved

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

Posted on 2016-11-30
2
65 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 41908048
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
ID: 41908067
Thank you
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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