Class HttpAPIClientHelper
java.lang.Object
com.clickhouse.client.api.internal.HttpAPIClientHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hc.client5.http.impl.classic.CloseableHttpClientCreates or returns default SSL context.org.apache.hc.core5.http.ClassicHttpResponseexecuteRequest(ClickHouseNode server, Map<String, Object> requestConfig, org.apache.hc.core5.io.IOCallback<OutputStream> writeCallback) static intgetHeaderInt(org.apache.hc.core5.http.Header header, int defaultValue) static StringgetHeaderVal(org.apache.hc.core5.http.Header header, String defaultValue) static <T> TgetHeaderVal(org.apache.hc.core5.http.Header header, T defaultValue, Function<String, T> converter) readError(org.apache.hc.core5.http.ClassicHttpResponse httpResponse) Reads status line and if error tries to parse response body to get server error message.
-
Constructor Details
-
HttpAPIClientHelper
-
-
Method Details
-
createSSLContext
Creates or returns default SSL context.- Returns:
- SSLContext
-
createHttpClient
public org.apache.hc.client5.http.impl.classic.CloseableHttpClient createHttpClient() -
readError
Reads status line and if error tries to parse response body to get server error message.- Parameters:
httpResponse- - HTTP response- Returns:
-
executeRequest
public org.apache.hc.core5.http.ClassicHttpResponse executeRequest(ClickHouseNode server, Map<String, Object> requestConfig, org.apache.hc.core5.io.IOCallback<OutputStream> writeCallback) throws IOException- Throws:
IOException
-
getHeaderInt
public static int getHeaderInt(org.apache.hc.core5.http.Header header, int defaultValue) -
getHeaderVal
-
getHeaderVal
-