java.lang.Object
org.seppiko.commons.utils.http.AsyncHttpClientUtil
Http Async Response Util with java.net.http
HttpRequest see
HttpClientUtil- Author:
- Leonard Woo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpResponse<byte[]>getAsyncResponseByteArray(HttpRequest req, InetSocketAddress proxy)Get Async byte array Responsestatic HttpResponse<InputStream>getAsyncResponseInputStream(HttpRequest req, InetSocketAddress proxy)Get Async InputStream Responsestatic HttpResponse<String>getAsyncResponseString(HttpRequest req, InetSocketAddress proxy)Get Async String Response
-
Constructor Details
-
AsyncHttpClientUtil
public AsyncHttpClientUtil()
-
-
Method Details
-
getAsyncResponseString
public static HttpResponse<String> getAsyncResponseString(HttpRequest req, InetSocketAddress proxy) throws HttpClientExceptionGet Async String Response- Parameters:
req- HttpRequest objectproxy- Not null is enable proxy- Returns:
- Exception is NULL
- Throws:
HttpClientException- get async response exception
-
getAsyncResponseByteArray
public static HttpResponse<byte[]> getAsyncResponseByteArray(HttpRequest req, InetSocketAddress proxy) throws HttpClientExceptionGet Async byte array Response- Parameters:
req- HttpRequest objectproxy- Not null is enable proxy- Returns:
- Exception is NULL
- Throws:
HttpClientException- get async response exception
-
getAsyncResponseInputStream
public static HttpResponse<InputStream> getAsyncResponseInputStream(HttpRequest req, InetSocketAddress proxy) throws HttpClientExceptionGet Async InputStream Response- Parameters:
req- HttpRequest objectproxy- Not null is enable proxy- Returns:
- Exception is NULL
- Throws:
HttpClientException- get async response exception
-