2/18/1
This commit is contained in:
@@ -41,6 +41,21 @@ class CRUD {
|
||||
}
|
||||
}
|
||||
|
||||
Future<dynamic> getAgora({
|
||||
required String channelName,
|
||||
}) async {
|
||||
var res = await http
|
||||
.get(Uri.parse('http://localhost:8080/token?channelName=$channelName'));
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
var response = jsonDecode(res.body);
|
||||
print(await response.stream.bytesToString());
|
||||
return response['token'];
|
||||
} else {
|
||||
print(res.reasonPhrase);
|
||||
}
|
||||
}
|
||||
|
||||
Future<dynamic> getLlama({
|
||||
required String link,
|
||||
required String payload,
|
||||
|
||||
Reference in New Issue
Block a user