http request to localhost kestrel server hangs when using node.js client -


i have http testing tools written in node.js i'm using test kestrel server on localhost. node.js makes request seems hang , timeout. can see in kestrel logs http request made, , making request local kestrel server using postman , other client tools seem work.

why making http request using node.js hang on return? seems successful in making request server, waiting sort of http end return?

it works fine if deploy service azure , hit same service on internet - hangs when it's on localhost , client node.js.

here's node.js code

describe('homepage', function(){     it('should respond get',function(done){     superagent         .get('http://localhost:5000/message')         .end(function(err, res){             expect(res.status).to.equal(200);             done()         })     }) }); 

and simple asp core/5 web api runs fine on localhost

   [route("/message")]     public class messagecontroller : controller     {         [httpget]         public string get()         {             return "hello";         }     } 


Comments