Pass only Uri to package:http APIs (#74285)

This commit is contained in:
Nate Bosch
2021-01-20 09:59:03 -08:00
committed by GitHub
parent 5318782ac8
commit dcc4fdd558
4 changed files with 6 additions and 7 deletions

View File

@@ -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;