I believe so. Post below scoped the "result" name. Brian Kotek says in
the comments you can also do <cfset var cfhttp="" />

http://www.coldfusionmuse.com/index.cfm/2008/6/16/cfc.application.variables

- Gabriel

On Wed, Mar 24, 2010 at 8:27 PM, Andrew Grosset <[email protected]> wrote:
>
> using cfhttp within a function (get or head) should I be var scoping cfhttp?
> I'm fairly certain I should but have not been able to find any examples.
>
> <cffunction name="youTubedata" access="public" output="true">
>
> <cfargument name="youtubeKey" type="string" required="true">
>
> <cfset var cfhttp = structNew()>
> <cfset var myreturn = structNew()>
> <cfset var thisimage = false>
> <cfset var xmlQuery = "">
> <cfset var intRow = "">
> <cfset var xmlRow = "">
> <cfset var intChild = "">
> <cfset var youtubeimage = "">
> <cfset var youtubetitle = "">
> <cfset var youtubeduration = "">
>
> <cfhttp method="get" 
> url="http://gdata.youtube.com/feeds/api/videos/#arguments.youtubeKey#";>
>
> <cfif cfhttp.status_code eq 200>
>
>        <cfset xmlQuery = XmlParse( cfhttp.filecontent )>
>
>      <!--- etc, etc......... --->
>
> </cfif>
>
> </cffunction>
>
> Andrew.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332229
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to