Skip to content

Commit

Permalink
getStatus, (#103)
Browse files Browse the repository at this point in the history
1.5.2 xenon
new proto
  • Loading branch information
dkovacevic authored Jul 24, 2023
1 parent 5fb635b commit ca77523
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.wire</groupId>
<artifactId>lithium</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<name>Lithium</name>
<description>Wire Bots SDK written in Java</description>
<url>https://wire.com/</url>
Expand Down Expand Up @@ -71,7 +71,7 @@
<dependency>
<groupId>com.wire</groupId>
<artifactId>xenon</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/com/wire/lithium/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit ca77523

Please sign in to comment.