Created
March 15, 2020 15:20
-
-
Save ejnshtein/131c60e1e4fad7a03f21a8bfb9370dfa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import request from '@ejnshtein/smol-request' | |
const startTime = Date.now() | |
request('https://google.com', { responseType: 'headers' }) | |
.then(() => { | |
const endTime = Date.now() | |
console.log(`My latency is ~${endTime - startTime}ms`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment