[thelist] Cold Fusion: cfhttp

Joshua Olson joshua at waetech.com
Fri Apr 30 08:38:15 CDT 2004


> -----Original Message-----
> From: Drew Shiel
> Sent: Friday, April 30, 2004 9:10 AM
>
> Anyone had any experience in using cfhttp to connect to a password
> protected server?
>
> What I was trying to use:
>
> <cfhttp
> url="https://username:password@my.server.com/summat.php?para=sth&p
> aratwo=sthels" method="GET" >
>
> But I'm getting only "Connection Failure" in cfhttp.filecontent. The url
> resolves fine in a browser, and has content.

Drew,

That URL construct is, IIRC, a proprietary extension added by IE.  Behind
the scenes, IE uses that information to negotiate security with the server.

> I've tried using the "username" and "password" attributes of cfhttp, with
> the same result.

I always had better luck by using MS's COM objects for connection to
servers.  Specifically, take a look at XMLHTTP and WinHTTP.  WinHTTP is
somewhat older and may be difficult to find.

Here's an example showing XMLHTTP in action.  It's vbscript, but the
concepts are all the same:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_
exch2k_copying_items_http.asp

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list