Пример #1
0
        public static async Task <GeoipObject> RequestAsync(string ip)
        {
            WebClient wc   = CreateClient();
            string    data = await wc.DownloadStringTaskAsync(new Uri($"http://ip-api.com/csv/{ip}?lang={Language}"));

            return(GeoipObject.Deserialize(data));
        }
Пример #2
0
        public static GeoipObject Request(string ip)
        {
            WebClient wc   = CreateClient();
            string    data = wc.DownloadString($"http://ip-api.com/csv/{ip}?lang={Language}");

            return(GeoipObject.Deserialize(data));
        }