Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 25, 2020 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/86f91401559db0a4be645b72c51302f9 to your computer and use it in GitHub Desktop.
Save parzibyte/86f91401559db0a4be645b72c51302f9 to your computer and use it in GitHub Desktop.
const URL_API = "https://api.ipify.org/?format=json";
fetch(URL_API)
.then(respuestaRaw => respuestaRaw.json())
.then(respuesta => {
const ip = respuesta.ip;
console.log("Tu IP es: ");
console.log(ip)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment