What could cause “connect ETIMEDOUT” error when the URL is working in browser?

后端 未结 6 1441
深忆病人
深忆病人 2021-02-19 07:46

I train myslef with NodeJS and tried a simple GET call. Here is my code:

var http = require(\'http\');

var options = {
    host: \'www.boardgamegeek.com\',
             


        
6条回答
  •  感情败类
    2021-02-19 08:32

    if you have URL like :

      URL: 'localhost:3030/integration', 
    

    The URL above cause some issues because HTTP does not exist at the beginning of URL so Just change it to it should work.

    URL: 'http://localhost:3030/integration', 
      
    

提交回复
热议问题