|
String urlWithoutParams = url.scheme() + "://" + url.host() + ":" + url.port() + url.encodedPath(); |
The InfluxDBClientOptions.ParsedUrl constructor strips the square brackets off IPv6 addresses, rendering urls containing them invalid. E.g. http://[2001:db8:3333:4444:5555:6666:7777:8888]:8086/ becomes http://2001:db8:3333:4444:5555:6666:7777:8888:8086/.
See how okhttp3 HttpUrl.Builder.toString() handles IPv6 addresses.
influxdb-client-java/client/src/main/java/com/influxdb/client/InfluxDBClientOptions.java
Line 697 in 886eb88
The InfluxDBClientOptions.ParsedUrl constructor strips the square brackets off IPv6 addresses, rendering urls containing them invalid. E.g.
http://[2001:db8:3333:4444:5555:6666:7777:8888]:8086/becomeshttp://2001:db8:3333:4444:5555:6666:7777:8888:8086/.See how okhttp3 HttpUrl.Builder.toString() handles IPv6 addresses.