diff --git a/src/ipinfo.rs b/src/ipinfo.rs index a2870f4..a9a3189 100644 --- a/src/ipinfo.rs +++ b/src/ipinfo.rs @@ -79,6 +79,7 @@ impl Default for IpInfoConfig { /// IPinfo requests context structure. pub struct IpInfo { + url: String, token: Option, client: reqwest::Client, cache: LruCache, @@ -119,7 +120,10 @@ impl IpInfo { let client = reqwest::Client::builder().timeout(config.timeout).build()?; + let url = "https://ipinfo.io".to_owned(); + let mut ipinfo_obj = Self { + url, client, token: config.token, cache: LruCache::new(