Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-Sent Events (SSE) support #36

Merged
merged 16 commits into from
Aug 1, 2023
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
4 changes: 3 additions & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ dependencies {
implementation 'com.google.code.gson:gson:2.9.1'

// https://square.github.io/okhttp
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp-sse
implementation 'com.squareup.okhttp3:okhttp-sse:4.11.0'

// Adds getter, setter and builder boilerplate
// https://projectlombok.org/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public enum FeatureFetchErrorCode {
*/
NO_RESPONSE_ERROR,

/**
* - could not establish a connection to the events (server-sent events) for feature updates
*/
SSE_CONNECTION_ERROR,

/**
* - there was an unknown error that occurred when attempting to make the request.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package growthbook.sdk.java;

public enum FeatureRefreshStrategy {
STALE_WHILE_REVALIDATE,
SERVER_SENT_EVENTS
}
Loading
Loading