程序包 cn.gybyt.util

类 HttpUtil


  • public class HttpUtil
    extends Object
    http工具类(使用HttpTemplate)
    • 构造器详细资料

      • HttpUtil

        public HttpUtil()
    • 方法详细资料

      • 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 - 返回值类型(为空默认返回字符串)
        返回: