0

Is it possible to get the client Ip address from the response of ta fetch? Something like this

  fetch(url)
    .then((response) => {
      console.log("My IP Address: ", response.originIP);
    })
yalpsideman
  • 23
  • 1
  • 5

1 Answers1

2

That is not possible. All the available methods of the fetch response are listed here: https://developer.mozilla.org/en-US/docs/Web/API/Response

You could however create a web service to return an IP address: How to get client's IP address using JavaScript?

Remi
  • 3,735
  • 7
  • 33
  • 66