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;
}
>Solution :
Website secured by ssl (https) can only access resources that are also secured with ssl
Checking the documentation reveals that:
256-bit SSL encryption is not available for this free API. Please see our pro service.
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
