com.litongjava.utils.http.litonghttpclient.HttpClientUtils Maven / Gradle / Ivy
package com.litongjava.utils.http.litonghttpclient;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.util.Map;
import javax.servlet.ServletInputStream;
/**
* HttpURLConnection
*
* @author litong
* @date 2019年6月1日_下午12:46:31
* @version 1.0
* @desc
*/
public class HttpClientUtils {
public static String get(String targetUrl, Map data){
return HttpURLConnectionUtils.get(targetUrl, data);
}
public static String post(String targetUrl, Map data) throws MalformedURLException {
return HttpURLConnectionUtils.post(targetUrl, data);
}
public static String post(String targetUrl, Map headers, Map params) {
return HttpURLConnectionUtils.post(targetUrl, headers, params);
}
public static HttpURLConnection execute(String targetUrl, String method, Map headers, Map reqParam)
throws MalformedURLException {
return HttpURLConnectionUtils.execute(targetUrl, method, headers, reqParam);
}
public static HttpURLConnection executeValues(String targetUrl, String method, Map headers, Map reqMap) {
return HttpURLConnectionUtils.executeValues(targetUrl, method, headers, reqMap);
}
public static HttpURLConnection execute(String targetUrl, String method, Map headers, ServletInputStream reqInputStream) {
return HttpURLConnectionUtils.execute(targetUrl, method, headers, reqInputStream);
}
public static void disconnect(HttpURLConnection httpURLConnection) {
HttpURLConnectionUtils.disconnect(httpURLConnection);
}
public static HttpURLConnection executeGet(String targetUrl, String method, Map headers, Map requestParams) {
return HttpURLConnectionUtils.executeGet(targetUrl, method, headers, requestParams);
}
public static StringBuffer buildHttpQueryParams(Map params) {
return HttpURLConnectionUtils.buildHttpQueryParams(params);
}
public static HttpResponse get(String targetUrl, Map header, Map body) {
return HttpURLConnectionUtils.get(targetUrl,header,body);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy