/whoami

quick API that returns your IP address and headers.

Primary LanguageJavaScriptBSD Zero Clause License0BSD

whoami

quick API that returns your IP address and headers.

get IP address and headers

JS

let whoami = 'https://whoami.deno.dev'
let response = await fetch(whoami)
let data = await response.json()

console.log(data)

CLI

curl https://whoami.deno.dev?pretty

get IP address only

JS

let whoami = 'https://whoami.deno.dev?ip'
let response = await fetch(whoami)
let ip = await response.text()

console.log(ip)

CLI

curl https://whoami.deno.dev?ip

license

0BSD