web-services - 无法在 ColdFusion 中进行 CFHTTP 调用
问题描述
我试图CFHTTP
从 ColdFusion 打电话,但它不起作用。
<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 ',方法='POST'}
解决方案
如果您在设置了代理服务器的环境中运行它,您可能需要在 cfhttp 标记中添加代理服务器和代理端口。
<cfhttp url="yourURL" method="post" proxyserver="xproxy.what.ever" result="httpResult" proxyport="8080" >
<cfhttpparam type="Header" name="Accept-Encoding" value="*">
</cfhttp>
推荐阅读
- .net - Windows 10 上的 SSH.NET 如何在我们的远程 Linux 机器上启动一个保持运行的进程?
- ibm-mobilefirst - MobileFirst 加密/解密用户凭证
- c - 删除结束行字符
- reactjs - 无法从表单接收数据
- apache-spark - Apache/Cloudera HUE / Livy Spark Server - InterpreterError: 无法启动解释器
- git - 通过特定提交将 git 更改从一个分支隔离到另一个分支
- optimization - 基于变量在阶跃函数中生成值
- node.js - 为什么 MongoDB 为该模式中不存在的字段创建索引?
- python - 从 Pandas DataFrame 创建 Spark DataFrame
- azure-language-understanding - 无法映射到 personName 预建实体