I'm setting a simple scenario where I need to grab a file and save it. The
code is straight from the example section, minus the actuall CFHTTP call.
This is on my development workstation running W2K SP3 and 4.5.1 SP2. I've
verified that I can load the file in the browser manually, so that's not an
issue. Thanks for any help!
=============================================
Error:
Connection Failure
The mime-type:
Unable to determine MIME type of file.
The Status Code:
Connection Failure. Status code unavailable.
The Raw Header:
Output the Response Headers:
==============================================
Code:
<cfhttp url="htpp://127.0.0.1/of/in/testfile.txt" method="GET">
<cfoutput>
#cfhttp.fileContent#<BR>
<H3><B>The mime-type:</B></H3><BR>
#cfhttp.mimeType#<BR>
<H3><B>The Status Code:</B></H3><BR>
#cfhttp.statuscode#<BR>
<H3><B>The Raw Header:</B></H3><BR>
#cfhttp.header#<BR>
</cfoutput>
<H3><B>Output the Response Headers:</B></H3><BR>
<HR>
<cfloop collection = #cfhttp.responseHeader# item = "httpHeader">
<cfset value = cfhttp.responseHeader[httpHeader]>
<cfif IsSimpleValue(value)>
<cfoutput>
#httpHeader# : #value#<BR>
</cfoutput>
<cfelse>
<cfloop index = "counter" from = 1 to = #ArrayLen(value)#>
<cfoutput>
#httpHeader# : #value[counter]#<BR>
</cfoutput>
</cfloop>
</cfif>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.