Package org.tsugi.http
Class HttpClientUtil
- java.lang.Object
-
- org.tsugi.http.HttpClientUtil
-
public class HttpClientUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpClientUtil()
-
Method Summary
-
-
-
Method Detail
-
setupGet
public static HttpRequest setupGet(String url, Map<String,String> parameters, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
getClient
public static HttpClient getClient()
-
sendGet
public static HttpResponse<String> sendGet(String url, Map<String,String> parameters, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
sendGetStream
public static HttpResponse<InputStream> sendGetStream(String url, Map<String,String> parameters, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
sendPost
public static HttpResponse<String> sendPost(String url, Map<String,String> data, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
sendPost
public static HttpResponse<String> sendPost(String url, String data, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
sendBody
public static HttpResponse<String> sendBody(String method, String url, Map<String,String> data, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
sendBody
public static HttpResponse<String> sendBody(String method, String url, String data, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
sendBody
public static HttpResponse<String> sendBody(String method, String url, HttpRequest.BodyPublisher body, Map<String,String> headers, StringBuffer dbs) throws Exception
- Throws:
Exception
-
-