📜  免费 IP 地理位置 API JAVASCRIPT - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:31.882000             🧑  作者: Mango

代码示例1
fetch("https://find-any-ip-address-or-domain-location-world-wide.p.rapidapi.com/iplocation?apikey=API-KEY", {
  "method": "GET",
  "headers": {
  "x-rapidapi-host": "find-any-ip-address-or-domain-location-world-wide.p.rapidapi.com",
  "x-rapidapi-key": "YOUR-RAPID-API-KEY"
  }
  })
  .then(response => {
  console.log(response.json());
  })
  .catch(err => {
  console.error(err);
});