1
fwrq41251 2015-09-24 15:22:31 +08:00
为啥不直接按 IP 访问
|
3
RFC2109 2015-09-24 17:12:10 +08:00
if (StringUtils.isNotBlank(ip)) {
HttpHost proxy = new HttpHost(ip, uri.getPort()); DefaultProxyRoutePlanner routePlanner = new DefaultProxyRoutePlanner( proxy); builder.setRoutePlanner(routePlanner); } httpClient = builder.build(); builder.setRoutePlanner(systemDefaultRoutePlanner); String result = httpClient.execute(request, stringHandleResponse); |