Pass only Uri to package:http APIs (#74285)
This commit is contained in:
@@ -28,7 +28,7 @@ Future<void> main(List<String> args) async {
|
||||
Future<Archive> fetchArchive(String url, int maxTries) async {
|
||||
List<int> responseBytes;
|
||||
for (int i = 0; i < maxTries; i++) {
|
||||
final http.Response response = await http.get(url);
|
||||
final http.Response response = await http.get(Uri.parse(url));
|
||||
if (response.statusCode == 200) {
|
||||
responseBytes = response.bodyBytes;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user