带有上下文类型标头的coldfusion cfhttp GET方法问题

问题描述 投票:1回答:1
<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无法获得正确的结果。有人知道哪一部分不对吗?

coldfusion cfml cfhttp getmethod
1个回答
1
投票

您需要使用encodeForURL转义回调URL。

© www.soinside.com 2019 - 2024. All rights reserved.