Class RestClient
java.lang.Object
com.codingapi.springboot.framework.rest.RestClient
-
Constructor Summary
ConstructorsConstructorDescriptionRestClient(HttpProxyProperties httpProxyProperties, String baseUrl, int retryCount, String emptyResponse, HttpRequest.IHttpRequestHandler requestHandler, HttpRequest.IHttpResponseHandler responseHandler) RestClient(String baseUrl) -
Method Summary
Modifier and TypeMethodDescriptionget(String api, RestParamBuilder paramBuilder) get(String api, org.springframework.http.HttpHeaders headers, RestParamBuilder paramBuilder) get(String api, org.springframework.http.HttpHeaders headers, org.springframework.util.MultiValueMap<String, String> requestParams) getGetRequest(String api, org.springframework.http.HttpHeaders headers, org.springframework.util.MultiValueMap<String, String> requestParams) getPostRequest(String api, org.springframework.http.HttpHeaders headers, com.alibaba.fastjson.JSON requestBody) post(String api, RestParamBuilder paramBuilder) post(String api, org.springframework.http.HttpHeaders headers, com.alibaba.fastjson.JSON requestBody) post(String api, org.springframework.http.HttpHeaders headers, RestParamBuilder paramBuilder)
-
Constructor Details
-
RestClient
public RestClient(HttpProxyProperties httpProxyProperties, String baseUrl, int retryCount, String emptyResponse, HttpRequest.IHttpRequestHandler requestHandler, HttpRequest.IHttpResponseHandler responseHandler) -
RestClient
-
-
Method Details
-
get
-
get
public String get(String api, org.springframework.http.HttpHeaders headers, RestParamBuilder paramBuilder) -
get
-
get
-
get
-
getGetRequest
-
getPostRequest
-
post
-
post
-
post
-
post
public String post(String api, org.springframework.http.HttpHeaders headers, RestParamBuilder paramBuilder)
-