/ Published in: ColdFusion

Accessing the 37signals product Highrise API requires HTTPS. I initially had problems with this (seemingly the certificate authority) from ColdFusion initially. Found the solution by tapping into the underlying Java layer to manage the providers.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<cfset highrise = "https://YOUR_DOMAIN.highrisehq.com/users.xml"/> <cfset username = "YOUR_TOKEN"/> <cfset password = "X"/> <!--- Remove JsafeJCE Provider ---> <cfset security = CreateObject( "java", "java.security.Security" )/> <cfset provider = security.getProvider( "JsafeJCE" )/> <cfset security.removeProvider( "JsafeJCE" )/> <!--- Do the call ---> <cfhttp url="#highrise#" method="get" username="#username#" password="#password#"> <cfhttpparam type="header" name="Accept" value="application/xml"/> <cfhttpparam type="header" name="Content-Type" value="application/xml"/> </cfhttp> <!--- Put it back (not sure if this is needed.) ---> <cfset security.insertProviderAt( provider, 1 )/> <cfdump var="#CFHTTP.FileContent#"/>
Comments
