private static void http(String ip) { ip = StringUtils.trim(ip); String url = MessageFormat.format("http://api.ip138.com/query/?ip={0}&token=7bf8b6b142860906263759a0705ec341", ip); try { Request request = Request.Get(url); String ret = request.connectTimeout(5000).socketTimeout(5000).execute().returnContent().asString(); if (StringUtils.contains(ret, "云南")) { logger.debug(ip); } } catch (Exception e) { logger.error(e.getMessage(), e); } }