diff --git a/pom.xml b/pom.xml index 313f7e7..cbbdfae 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.wire lithium - 3.5.1 + 3.5.2 Lithium Wire Bots SDK written in Java https://wire.com/ @@ -71,7 +71,7 @@ com.wire xenon - 1.5.1 + 1.5.2 org.slf4j diff --git a/src/main/java/com/wire/lithium/API.java b/src/main/java/com/wire/lithium/API.java index 68d5c1b..7c1dc8d 100644 --- a/src/main/java/com/wire/lithium/API.java +++ b/src/main/java/com/wire/lithium/API.java @@ -44,6 +44,7 @@ import javax.ws.rs.core.*; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.net.URI; import java.nio.charset.StandardCharsets; import java.security.NoSuchAlgorithmException; import java.util.*; @@ -103,8 +104,12 @@ private static String deriveHost() { } public Response status() { - return httpClient.target(wireHost) - .path("status") + URI uri = URI.create(wireHost); + String scheme = uri.getScheme(); + String host = uri.getHost(); + String target = String.format("%s://%s", scheme, host); + return httpClient.target(target) + .path("api-version") .request() .get(); }