Skip to content

Commit 2656606

Browse files
Fix base URL
1 parent b57252b commit 2656606

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

appcheck/app/src/main/java/com/google/firebase/example/appcheck/ApiWithAppCheckExample.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
public class ApiWithAppCheckExample {
1818
private interface YourExampleBackendService {
1919
@GET("yourExampleEndpoint")
20-
Call<List<String>> exampleData(@Header("X-Firebase-AppCheck") String appCheckToken);
20+
Call<List<String>> exampleData(
21+
@Header("X-Firebase-AppCheck") String appCheckToken);
2122
}
2223

2324
YourExampleBackendService yourExampleBackendService = new Retrofit.Builder()
24-
.baseUrl("https://yourbackend.example.com/yourApiEndpoint")
25+
.baseUrl("https://yourbackend.example.com/")
2526
.build()
2627
.create(YourExampleBackendService.class);
2728

@@ -32,7 +33,8 @@ public void callApiExample() {
3233
@Override
3334
public void onSuccess(@NonNull AppCheckToken tokenResponse) {
3435
String appCheckToken = tokenResponse.getToken();
35-
Call<List<String>> apiCall = yourExampleBackendService.exampleData(appCheckToken);
36+
Call<List<String>> apiCall =
37+
yourExampleBackendService.exampleData(appCheckToken);
3638
// ...
3739
}
3840
});

appcheck/app/src/main/java/com/google/firebase/example/appcheck/kotlin/ApiWithAppCheckExample.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ApiWithAppCheckExample {
1717
}
1818

1919
var yourExampleBackendService: YourExampleBackendService = Retrofit.Builder()
20-
.baseUrl("https://yourbackend.example.com/yourApiEndpoint")
20+
.baseUrl("https://yourbackend.example.com/")
2121
.build()
2222
.create(YourExampleBackendService::class.java)
2323

0 commit comments

Comments
 (0)