<cfhttp method="GET" url="https://xxxx/Authentication/CorpPassAuth?scope=abc&callback_url=https://xxxx/apiresponse.cfm" result="a">
<cfhttpparam type="header" name="Content-Type" value="application/json"></cfhttpparam>
<cfhttpparam type="header" name="X-IBM-Client-Secret" value="xxx"></cfhttpparam>
<cfhttpparam type="header" name="X-IBM-Client-Id" value="xxxx"></cfhttpparam>
我将相关证书导入了cacert。所有POST方法API都可以正常工作,只有GET方法无法获得预期的结果。预期结果应为json,但结果显示给我网站页面。JAVA是1.8.0_231-b11。SSL证书为entrust.net
此API已通过使用POSTMAN,API TESTER测试,卷曲正常,但Coldfusion无法获得正确的结果。有人知道哪一部分不对吗?
您需要使用encodeForURL
转义回调URL。