@@ -37,19 +37,21 @@ public static EppoClient getInstance() {
37
37
38
38
private EppoClient (
39
39
String apiKey ,
40
- String baseUrl ,
41
40
String sdkName ,
42
41
String sdkVersion ,
42
+ @ Nullable @ Deprecated String host ,
43
+ @ Nullable String baseUrl ,
43
44
@ Nullable AssignmentLogger assignmentLogger ,
44
45
@ Nullable BanditLogger banditLogger ,
45
46
boolean isGracefulMode ,
46
47
@ Nullable IAssignmentCache assignmentCache ,
47
48
@ Nullable IAssignmentCache banditAssignmentCache ) {
48
49
super (
49
50
apiKey ,
50
- baseUrl ,
51
51
sdkName ,
52
52
sdkVersion ,
53
+ host ,
54
+ baseUrl ,
53
55
assignmentLogger ,
54
56
banditLogger ,
55
57
null ,
@@ -76,7 +78,8 @@ public static class Builder {
76
78
private boolean isGracefulMode = DEFAULT_IS_GRACEFUL_MODE ;
77
79
private boolean forceReinitialize = DEFAULT_FORCE_REINITIALIZE ;
78
80
private long pollingIntervalMs = DEFAULT_POLLING_INTERVAL_MS ;
79
- private String host = Constants .DEFAULT_BASE_URL ;
81
+ private String host = null ; // TODO remove with next major version bump.
82
+ private String apiBaseUrl = null ;
80
83
81
84
// Assignment and bandit caching on by default. To disable, call
82
85
// `builder.assignmentCache(null).banditAssignmentCache(null);`
@@ -139,13 +142,23 @@ public Builder pollingIntervalMs(long pollingIntervalMs) {
139
142
140
143
/**
141
144
* Overrides the host from where it fetches configurations. This typically should not be
142
- * explicitly set so that the default of the Fastly CDN is used.
145
+ * explicitly set so that the default of the Fastly CDN is used. @Deprecated - use `apiBaseUrl`
146
+ * instead
143
147
*/
144
148
public Builder host (String host ) {
145
149
this .host = host ;
146
150
return this ;
147
151
}
148
152
153
+ /**
154
+ * Overrides the base URL from where the SDK fetches configurations. This typically should not
155
+ * be explicitly set so that the default API URL is used.
156
+ */
157
+ public Builder apiBaseUrl (String apiBaseUrl ) {
158
+ this .apiBaseUrl = apiBaseUrl ;
159
+ return this ;
160
+ }
161
+
149
162
public Builder assignmentCache (IAssignmentCache assignmentCache ) {
150
163
this .assignmentCache = assignmentCache ;
151
164
return this ;
@@ -177,7 +190,8 @@ public EppoClient buildAndInit() {
177
190
apiKey ,
178
191
sdkName ,
179
192
sdkVersion ,
180
- host ,
193
+ host , // TODO remove with next major version bump.
194
+ apiBaseUrl ,
181
195
assignmentLogger ,
182
196
banditLogger ,
183
197
isGracefulMode ,
0 commit comments