Coldfusion: Check a URL

Platform:Coldfusion
Task:Check a URL
Discussion:
Sometimes you want to test a url before presenting it to a user to make sure that it exists
Example:
                                <cfhttp url="#rb.url#" method="GET" resolveurl="Yes" throwOnError="Yes"/>
                                <cfif #cfhttp.statuscode# eq "200 OK">
                                    do something with the url
                                </cfif>
Back to Index