Closed SimonDevHub closed 3 months ago
I overloaded the influxdbclient with okhttp3 to add certificate and context in options to use https :
var okHttpClient = new OkHttpClient.Builder()
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]);
InfluxDBClientOptions options = InfluxDBClientOptions.builder()
.url(url)
.authenticateToken(token)
.org(org)
.bucket(bucket)
.okHttpClient(okHttpClient)
.build();
It may help some people.
Steps to reproduce:
Expected behavior: With certificate : OK Without certificate : SSL verification error
Actual behavior: With http protocol : OK Check with "curl -v https://influxdb_service:8086" : OK With https protocol : com.influxdb.exceptions.BadRequestException (with or without certificate)
Specifications: