类 HttpUtils
java.lang.Object
net.jlxxw.http.spider.util.HttpUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static <T> org.springframework.http.ResponseEntity<T>exchange(ProxyRestTemplateObject object, String url, org.springframework.http.HttpMethod method, org.springframework.http.HttpEntity<?> requestEntity, Class<T> responseType) http get 请求static <T> Texecute(ProxyRestTemplateObject object, String url, org.springframework.http.HttpMethod method, org.springframework.web.client.RequestCallback requestCallback, org.springframework.web.client.ResponseExtractor<T> responseExtractor)
-
构造器详细资料
-
HttpUtils
-
-
方法详细资料
-
exchange
public static <T> org.springframework.http.ResponseEntity<T> exchange(ProxyRestTemplateObject object, String url, org.springframework.http.HttpMethod method, @Nullable org.springframework.http.HttpEntity<?> requestEntity, Class<T> responseType) throws org.apache.hc.client5.http.HttpHostConnectException http get 请求- 类型参数:
T- 数据类型- 参数:
object- 具有代理能力的 rest template 对象url- 请求的地址method- methodresponseType- 应答数据类型- 返回:
- 请求结果
- 抛出:
org.apache.hc.client5.http.HttpHostConnectException
-
execute
public static <T> T execute(ProxyRestTemplateObject object, String url, org.springframework.http.HttpMethod method, @Nullable org.springframework.web.client.RequestCallback requestCallback, @Nullable org.springframework.web.client.ResponseExtractor<T> responseExtractor) throws org.apache.hc.client5.http.HttpHostConnectException - 抛出:
org.apache.hc.client5.http.HttpHostConnectException
-