📜  ipify api - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:13.183000             🧑  作者: Mango

代码示例2
var http = require('http');

http.get({'host': 'api.ipify.org', 'port': 80, 'path': '/'}, function(resp) {
  resp.on('data', function(ip) {
    console.log("My public IP address is: " + ip);
  });
});