使用ColdFusion访问Highrise API
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用ColdFusion访问Highrise API相关的知识,希望对你有一定的参考价值。
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.
<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#"/>
以上是关于使用ColdFusion访问Highrise API的主要内容,如果未能解决你的问题,请参考以下文章
直接访问 application.cfc 会产生未捕获的 ColdFusion 错误