Skip to content

Commit ca77523

Browse files
authored
getStatus, (#103)
1.5.2 xenon new proto
1 parent 5fb635b commit ca77523

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.wire</groupId>
88
<artifactId>lithium</artifactId>
9-
<version>3.5.1</version>
9+
<version>3.5.2</version>
1010
<name>Lithium</name>
1111
<description>Wire Bots SDK written in Java</description>
1212
<url>https://wire.com/</url>
@@ -71,7 +71,7 @@
7171
<dependency>
7272
<groupId>com.wire</groupId>
7373
<artifactId>xenon</artifactId>
74-
<version>1.5.1</version>
74+
<version>1.5.2</version>
7575
<exclusions>
7676
<exclusion>
7777
<groupId>org.slf4j</groupId>

src/main/java/com/wire/lithium/API.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import javax.ws.rs.core.*;
4545
import java.io.ByteArrayOutputStream;
4646
import java.io.IOException;
47+
import java.net.URI;
4748
import java.nio.charset.StandardCharsets;
4849
import java.security.NoSuchAlgorithmException;
4950
import java.util.*;
@@ -103,8 +104,12 @@ private static String deriveHost() {
103104
}
104105

105106
public Response status() {
106-
return httpClient.target(wireHost)
107-
.path("status")
107+
URI uri = URI.create(wireHost);
108+
String scheme = uri.getScheme();
109+
String host = uri.getHost();
110+
String target = String.format("%s://%s", scheme, host);
111+
return httpClient.target(target)
112+
.path("api-version")
108113
.request()
109114
.get();
110115
}

0 commit comments

Comments
 (0)