cfhttp Considerations

While cfhttp is extremely powerful, it is worth mentioning some limitations in the various versions of ColdFusion. If you plan to make heavy use of cfhttp, you should carefully consider the issues discussed here.

JRE-Related Issues in ColdFusion MX

Depending on the JRE you are using with ColdFusion MX, there are several issues you need to be aware of that have the potential to affect your use of the cfhttp tag:

  • The IBM JRE does not properly support SSL connections. If you need to make an SSL connection, consider using the SUN JRE instead.

  • The SUN JRE does not always return a 404 status code when an attempt is made to GET or POST a nonexistent page.

  • As mentioned earlier, the timeout attribute of the cfhttp tag is not supported in versions of the SUN JRE prior to version 1.4.0.

Authentication

cfhttp supports Basic (plain text), Digest, and NTLM Authentication. This means you can use cfhttp to access password-protected pages and files residing on remote servers. Authentication is performed by entering a valid username and password in the username and password attributes of the cfhttp tag, as shown here:

<cfhttp method="method"
        URL="url_to_server"
        username="username"
        password="password">

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.