程序包 cn.gybyt.util
类 HttpUtil
- java.lang.Object
-
- cn.gybyt.util.HttpUtil
-
public class HttpUtil extends Object
http工具类(使用HttpTemplate)
-
-
构造器概要
构造器 构造器 说明 HttpUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <T> org.springframework.http.ResponseEntity<T>fetch(String url, org.springframework.http.HttpMethod method, Object body, org.springframework.util.MultiValueMap<String,String> headerMap, Map<String,Object> uriVariables, org.springframework.core.ParameterizedTypeReference<T> type)发送请求
-
-
-
方法详细资料
-
fetch
public static <T> org.springframework.http.ResponseEntity<T> fetch(String url, org.springframework.http.HttpMethod method, Object body, org.springframework.util.MultiValueMap<String,String> headerMap, Map<String,Object> uriVariables, org.springframework.core.ParameterizedTypeReference<T> type)
发送请求- 参数:
url- 请求链接method- 请求方式body- 请求体headerMap- 请求头uriVariables- 请求参数type- 返回值类型(为空默认返回字符串)- 返回:
-
-