how should I make this called to avoid blocking request?
const getLocation = async () => {
const LOCATION_URL = 'http://ip-api.com/json/?fields=country,city,lat,lon,timezone';
const response = await axios.get(LOCATION_URL);
return response.data;
}
CodePudding user response:
Website secured by ssl (https) can only access resources that are also secured with ssl
You have a few options now:
- Buy premium
- Use different API provider
- Create a backend proxy that will fetch the data and send it to you