Skip to content

Commit 4e05d06

Browse files
Fix example code in README.md (#570)
Adding missing Uri.parse( ) to statements
1 parent 798aad1 commit 4e05d06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'});
2020
print('Response status: ${response.statusCode}');
2121
print('Response body: ${response.body}');
2222
23-
print(await http.read('https://example.com/foobar.txt'));
23+
print(await http.read(Uri.parse('https://example.com/foobar.txt')));
2424
```
2525

2626
If you're making multiple requests to the same server, you can keep open a
@@ -84,7 +84,7 @@ import 'package:http/retry.dart';
8484
Future<void> main() async {
8585
final client = RetryClient(http.Client());
8686
try {
87-
print(await client.read('http://example.org'));
87+
print(await client.read(Uri.parse('http://example.org')));
8888
} finally {
8989
client.close();
9090
}

0 commit comments

Comments
 (0)