public class HttpClientUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.http.impl.client.CloseableHttpClient |
httpclient
连接器
|
protected static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
HttpClientUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
close() |
static <T> T |
execute(org.apache.http.client.methods.HttpRequestBase request,
HttpResponseCallbackHandler<T> responseHandler)
处理具体代理请求执行, 入口方法
|
static void |
init() |
protected static final org.slf4j.Logger LOGGER
protected static org.apache.http.impl.client.CloseableHttpClient httpclient
public static <T> T execute(org.apache.http.client.methods.HttpRequestBase request,
HttpResponseCallbackHandler<T> responseHandler)
throws Exception
Exceptionpublic static void close()
public static void init()
Copyright © 2015–2016 Baidu. All rights reserved.