node.js - nodejs https.get 方法访问国外网站
黄舟
黄舟 2017-04-17 14:40:17
0
1
533
const https = require('https');

https.get('https://www.google.com/', (res) => {
    console.log('statusCode: ', res.statusCode);
    console.log('headers: ', res.headers);

    res.on('data', (d) => {
        process.stdout.write(d);
    });

}).on('error', (e) => {
    console.error(e);
});


要想解析国外网址怎么解,已有搭建好shadowsocks的digital ocean服务器

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

全部回覆(1)
迷茫

雷雷

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!