代码片段
// npm i --save-dev requestconst request = require('request');const url = "http://ip.taobao.com/service/getIpInfo2.php"; // 淘宝接口request.post({ url: url, form: { ip: 'myip' }}, (err, httpResponse, body) => { const data = JSON.parse(body); console.log(data.data.ip);})