使用node.js客户端时,对localhost kestrel服务器的http请求挂起
我用node.js编写了一些http测试工具,用于在本地主机上测试kestrel服务器。Node.js发出请求,但随后似乎挂起并超时。我可以在kestrel日志中看到http请求已经发出,使用postman和其他客户端工具向本地kestrel服务器发出请求似乎是可行的 为什么使用node.js发出http请求会在返回时挂起?它似乎成功地向服务器发出请求,但它是否在等待某种http端返回 如果我将该服务部署到azure,并在internet上访问相同的服务,它就可以正常工作-它仅在本地主机上挂起,并且客户端为node.js 这是我的node.js代码使用node.js客户端时,对localhost kestrel服务器的http请求挂起,node.js,kestrel-http-server,Node.js,Kestrel Http Server,我用node.js编写了一些http测试工具,用于在本地主机上测试kestrel服务器。Node.js发出请求,但随后似乎挂起并超时。我可以在kestrel日志中看到http请求已经发出,使用postman和其他客户端工具向本地kestrel服务器发出请求似乎是可行的 为什么使用node.js发出http请求会在返回时挂起?它似乎成功地向服务器发出请求,但它是否在等待某种http端返回 如果我将该服务部署到azure,并在internet上访问相同的服务,它就可以正常工作-它仅在本地主机上挂起,
describe('homepage', function(){
it('should respond to GET',function(done){
superagent
.get('http://localhost:5000/message')
.end(function(err, res){
expect(res.status).to.equal(200);
done()
})
})
});
还有我的简单asp core/5 web api,它在本地主机上运行良好
[Route("/message")]
public class MessageController : Controller
{
[HttpGet]
public string Get()
{
return "hello";
}
}
我相信这可能是相关的:这是-这是我作为这个问题的伴奏而创造的问题。