1

I'm writing a ColdFusion function that is the following:

<cffunction name="checkStatusCode" output="false" access="private" returnType="void">
    <cfif result.Responseheader.Status_Code eq "400">
        <cfset isBadRequest = true>
    </cfif>
</cffunction>

It is both void and contains no parameters; I understand how I would call it if it had parameters and returned something; I'd simply put the code in a <cfset> tag. I simply want to run the function. What tags do I need to put it in?

Abhishekh Gupta
  • 6,206
  • 4
  • 18
  • 46
T. Tenner
  • 121
  • 9

1 Answers1

6

Either this:

<cfset checkStatusCode()>

or, if you are using cfscript,

checkStatusCode();

You could probably use <cfinvoke> if you tried hard enough.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Dan Bracuk
  • 20,699
  • 4
  • 26
  • 43