Advertisement
dereksir

Untitled

Apr 21st, 2024
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import got from 'got';
  2.  
  3. try {
  4.     // make HTTP request
  5.     const {body} = await got('https://httpbin.io/ip');
  6.     // log the response
  7.     console.log(body);
  8. } catch (error) {
  9.     console.error(error);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement