diff --git a/README.md b/README.md index af9077a..a0bf36e 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ public class Main { public static void main(String[] args) { var openFeature = OpenFeatureAPI.getInstance(); - openFeature.setProvider(new OctopusProvider(new OctopusConfiguration("Your Octopus client identifier"))); + openFeature.setProviderAndWait(new OctopusProvider(new OctopusConfiguration("Your Octopus client identifier"))); var openFeatureClient = openFeature.getClient(); var darkModeIsEnabled = openFeatureClient.getBooleanValue("dark-mode", false); diff --git a/pom.xml b/pom.xml index 4b03667..3285b97 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.octopus.openfeature octopus-openfeature-provider - 0.1.0 + 0.2.0 jar Octopus Deploy OpenFeature Provider diff --git a/src/main/java/com/octopus/openfeature/provider/OctopusClient.java b/src/main/java/com/octopus/openfeature/provider/OctopusClient.java index 4e8b611..c2b2b56 100644 --- a/src/main/java/com/octopus/openfeature/provider/OctopusClient.java +++ b/src/main/java/com/octopus/openfeature/provider/OctopusClient.java @@ -29,8 +29,7 @@ Boolean haveFeatureTogglesChanged(byte[] contentHash) if (contentHash.length == 0) { return true; } URI checkURI = getCheckURI(); HttpClient client = HttpClient.newHttpClient(); - // TODO: check client is v3 - HttpRequest request = HttpRequest.newBuilder() + HttpRequest request = HttpRequest.newBuilder() .GET() .uri(checkURI) .header("Authorization", String.format("Bearer %s", config.getClientIdentifier())) @@ -50,7 +49,6 @@ FeatureToggles getFeatureToggleEvaluationManifest() { URI manifestURI = getManifestURI(); HttpClient client = HttpClient.newHttpClient(); - // TODO: check client is v3 HttpRequest request = HttpRequest.newBuilder() .GET() .uri(manifestURI) @@ -97,6 +95,6 @@ private Boolean isSuccessStatusCode(int statusCode) { // This class needs to be static to allow deserialization private static class FeatureToggleCheckResponse { - byte[] contentHash; + public byte[] contentHash; } }