如何从本地主机节点服务器发送HTTP到另一个端口



嗨,我有一个节点运行在ec2盒子上的8080服务器上。

我有甘道夫(https://gandalf.readthedocs.org/en/latest/)在端口5000上运行在同一个ec2盒子上。

如何从节点发送post请求到

request.post({
    uri: "http://localhost:5000/user/",
        form: {
        name: username,
        keys: {
            keyname: ssh_string
        }
        },
    }, function(error, response, body) {
});

我得到一个404错误。有人猜测吗?

404表示您能够联系其他服务器,但您请求的页面没有找到,因此您应该检查您的其他服务器

相关内容

最新更新