我试图从ColdFusion中调用CFHTTP
,但它无效。
<cfhttp url="https://apracareers.localhost/be/index.cfm?event=apm.ExecuteRuleAndActionInApmApi&testExecID=1CCDBEBA-3892-8ED2-F158-A42B9D79317F" method="POST" resolveurl="no" charset="utf-8" >
<cfhttpparam type="Header" name="Accept-Encoding" value="*">
</cfhttp>
在我得到的日志中:
2018年5月14日下午14:04:13信息[A9ACF8BE-FFAD-0210-F70213D0E7DEF338] - 启动HTTP请求{URL ='https://apracareers.localhost/be/index.cfm?event=apm.ExecuteRuleAndActionInApmApi&testExecID=1CCDBEBA-3892-8ED2-F158-A42B9D79317F',method ='POST'}
答案 0 :(得分:1)
如果您在设置了proxyserver的环境中运行此操作,则可能需要在cfhttp标记中添加proxyserver和proxyport。
<cfhttp url="yourURL" method="post" proxyserver="xproxy.what.ever" result="httpResult" proxyport="8080" >
<cfhttpparam type="Header" name="Accept-Encoding" value="*">
</cfhttp>