untitled notebook

node v14.20.1
version: master
endpointsharetweet
const https = require('https'); const CacheableLookup = require('cacheable-lookup'); const cacheable = new CacheableLookup(); // cacheable.install(https.globalAgent); https.get('https://google.com', (response) => { response.resume(); response.once('end', () => { const second = https.get('https://google.com', (secondResponse) => { secondResponse.resume(); }); second.once('socket', () => { const socketTime = Date.now(); second.socket.once('lookup', () => { console.log(Date.now() - socketTime); }); }); }); });
Loading…

no comments

    sign in to comment