<CFTRY>
<cfhttp url="https://www.blah.com"
        method="GET"
        port="443"
        username="DOMAIN\USERNAME"
        password="**********"
        resolveurl="TRUE"
          throwonerror="YES">
</CFHTTP>
<CFCATCH type="any">
  <CFSET errormsg = cfcatch.Message>
  <CFSET errordetail = cfcatch.Detail>
</CFCATCH>
<CFOUTPUT>
  <CFIF IsDefined("errormsg")>
  #errormsg#<BR><BR>
  #errordetail#
  <CFELSE>
  #cfhttp.filecontent#
</cfoutput>

Jeff Garza
Web Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200

[EMAIL PROTECTED]
http://www.spectrumastro.com



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, April 05, 2001 11:50 AM
To: CF-Talk
Subject: can cfhttp access to https?







Hi,
Can cfhttp access to https site and get the files with username and pasword
provided?

if so, can anyone provide a code example!!

Thank you very much


yc





If you change the query in any way, it will rerun, so you can
do a
couple things...

One of the most interesting would be to make the CACHEDWITHIN
value a
variable, set in the Application.cfm, but updatable through the url.
So, when you wanted to "flush" the cache, you could call the
page with a
url ?cache=flush, and your code would set the value of the
CACHEDWITHIN
to 0.  Next run without the url variable would recache it back up.

<CFQUERY NAME="..." DATASOURCE="..." CACHEDWITHIN="
#CacheValue#">
......
</CFQUERY>

Application.cfm:

<CFIF IsDefined("URL.CACHE") AND URL.Cache eq "flush">
     <CFSET CacheValue = CreateTimeSpan(0,0,0,0)>
     <CFSET CacheValue = CreateTimeSpan(0,1,0,0)>
or whatever your normal cache value is --->
</CFIF>

Think this might work?

"Al Musella, DPM" wrote:
>
>    I make extensive use of cached queries on 1 of my
websites, that uses
> read-only data that gets updated once a week..
>
> the problem is that when I update that database, I want to
clear the cache
> so the new data is used.. sometimes the cached querry
presents a record
> that is no longer available, and when you click to get the
details - the
> record is no longer there, so it generates an error.
>
> So - how do you clear the cache? Hopefully with cfcode
without having to
> restart the CF server?
>
> Al Musella, DPM
> A1webs.com
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to