Home > Software design >  error when fetching IP from geolocation-db.com
error when fetching IP from geolocation-db.com

Time:01-04

  useEffect(() => {
    const get_ip = async () => {
      console.log("got here");
      const response = await fetch("https://geolocation-db.com/json/");
      const data = await response.json();
      console.log(data);
    };
    get_ip();
  }, [])

This is the error that is printed out:

GET https://geolocation-db.com/json/ net::ERR_BLOCKED_BY_CLIENT

What is wrong here? Why can't I fetch the IP from that website?

I can visit it fine in my browser.

CodePudding user response:

The GET request is blocked by an adblocker.

  •  Tags:  
  • Related