Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.octopus.openfeature</groupId>
<artifactId>octopus-openfeature-provider</artifactId>
<version>0.1.0</version>
<version>0.2.0</version>
<packaging>jar</packaging>

<name>Octopus Deploy OpenFeature Provider</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand All @@ -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)
Expand Down Expand Up @@ -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;
}
}