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 17
17
public class ApiWithAppCheckExample {
18
18
private interface YourExampleBackendService {
19
19
@ 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 );
21
22
}
22
23
23
24
YourExampleBackendService yourExampleBackendService = new Retrofit .Builder ()
24
- .baseUrl ("https://yourbackend.example.com/yourApiEndpoint " )
25
+ .baseUrl ("https://yourbackend.example.com/" )
25
26
.build ()
26
27
.create (YourExampleBackendService .class );
27
28
@@ -32,7 +33,8 @@ public void callApiExample() {
32
33
@ Override
33
34
public void onSuccess (@ NonNull AppCheckToken tokenResponse ) {
34
35
String appCheckToken = tokenResponse .getToken ();
35
- Call <List <String >> apiCall = yourExampleBackendService .exampleData (appCheckToken );
36
+ Call <List <String >> apiCall =
37
+ yourExampleBackendService .exampleData (appCheckToken );
36
38
// ...
37
39
}
38
40
});
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class ApiWithAppCheckExample {
17
17
}
18
18
19
19
var yourExampleBackendService: YourExampleBackendService = Retrofit .Builder ()
20
- .baseUrl(" https://yourbackend.example.com/yourApiEndpoint " )
20
+ .baseUrl(" https://yourbackend.example.com/" )
21
21
.build()
22
22
.create(YourExampleBackendService ::class .java)
23
23
You can’t perform that action at this time.
0 commit comments