类 HttpUtil
java.lang.Object
cn.warpin.core.util.HttpUtil
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringexecuteGet(String url, String token) http5的Get请求get 请求static StringgetClientIp(jakarta.servlet.http.HttpServletRequest request) 获取客户端ippost form请求postForm(org.springframework.web.client.RestTemplate restTemplate, String url, Object content, String username, String password) 带鉴权头的postFormjson请求postJson(org.springframework.web.client.RestTemplate restTemplate, String url, Object content, String username, String password) 带鉴权头的postJson
-
字段详细资料
-
authorizationHeader
-
-
构造器详细资料
-
HttpUtil
public HttpUtil()
-
-
方法详细资料
-
postJson
public String postJson(org.springframework.web.client.RestTemplate restTemplate, String url, Object content) json请求- 参数:
restTemplate-content-
-
postJson
public String postJson(org.springframework.web.client.RestTemplate restTemplate, String url, Object content, String username, String password) 带鉴权头的postJson- 参数:
restTemplate-url-content-username-password-- 返回:
-
postForm
public String postForm(org.springframework.web.client.RestTemplate restTemplate, String url, Object content) post form请求- 参数:
restTemplate-url-content-- 返回:
-
postForm
public String postForm(org.springframework.web.client.RestTemplate restTemplate, String url, Object content, String username, String password) 带鉴权头的postForm- 参数:
restTemplate-url-content-username-password-- 返回:
-
get
public String get(org.springframework.web.client.RestTemplate restTemplate, String url, Object content) get 请求- 参数:
restTemplate-url-content-- 返回:
-
executeGet
http5的Get请求- 参数:
url-token-- 返回:
-
getClientIp
获取客户端ip- 参数:
request-- 返回:
-