File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
appcheck/app/src/main/java/com/google/firebase/example/appcheck Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1717public 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 });
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments