We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b564a3 + db8bffd commit a11d797Copy full SHA for a11d797
lib/src/utils/turn_web.dart
@@ -3,11 +3,11 @@ import 'package:http/http.dart' as http;
3
4
Future<Map> getTurnCredential(String host, int port) async {
5
var url = 'https://$host:$port/api/turn?service=turn&username=flutter-webrtc';
6
- final res = await http.get(url);
7
- if (res.statusCode == 200) {
8
- var data = json.decode(res.body);
9
- print('getTurnCredential:response => $data.');
10
- return data;
11
- }
12
- return {};
13
+ final res = await http.get(Uri.parse(url));
+ if (res.statusCode == 200) {
+ var data = json.decode(res.body);
+ print('getTurnCredential:response => $data.');
+ return data;
+ }
+ return {};
+}
0 commit comments