node.js - 无法在 Azure 上发出 POST 请求 - EACCES
问题描述
我有一个在 Azure 中作为 Web App Bot 托管的 Node 应用程序。当我尝试从该应用程序使用 axios 发出 POST 请求时,它给了我以下错误:
{ Error: connect EACCES 172.30..etc etc
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
errno: 'EACCES',
code: 'EACCES',
syscall: 'connect',
address: '172.30..etc,etc',
port: 443,
config:
...
在本地,使用 Bot Framework Emulator 进行测试就像是一种魅力。
要求:
let reqConfig = {
headers: {
"Authorization": '123etc etc',
"Content-Type": "application/json"
}
}
axios.post("https://_______", body, reqConfig).then(r => {
console.log(r);
}).catch(e => {
console.log('ERR: ', e);
})
解决方案
推荐阅读
- sql-server - DECRYPTBYPASSPHRASE 有时会为相同的输入和密码返回 NULL
- sql - 在用户级别检索与每个标签对应的答案总数
- tsql - 如何将 Azure SQL 托管实例备份备份到 Azure Blob
- javascript - 如何进行 HTML 数字输入,将其值转换为十分之一(可能使用 jQuery)
- apache-kafka - EC2 上的 Kafka 集群
- c++ - 在 C++ 中使用 OpenCV 时网络摄像头中明显的 FPS 随机下降
- java - 如何在异步弹簧控制器中记录 RequestBody?
- python - 如何使用 python 打印精度、召回率、fscore?
- xcode - NSAppearanceNameAqua 在暗模式和亮模式下都返回
- android - 当我单击编辑它时,我的文本字段隐藏在 BottomNavigationBar 的键盘后面