Function ipify_api::get_ip [−][src]
pub fn get_ip(
url: &str
) -> impl Future<Item = String, Error = Error>
This function takes an ipify endpoint to query. Works only on HTTP. If an empty string is given, it uses the default (http://api.ipify.org)
get_ip("http://my-custom-ipify-instance.rs") .map(|ip| println!("{}", ip)) .map_err(|e| println!("{}", e));