首页 > 解决方案 > 无法在 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);
    })  

标签: node.jsazureaxiosbotframework

解决方案


推荐阅读