File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ you to make individual HTTP requests with minimal hassle:
15
15
``` dart
16
16
import 'package:http/http.dart' as http;
17
17
18
- var url = 'http ://example.com/whatsit/create';
18
+ var url = 'https ://example.com/whatsit/create';
19
19
var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'});
20
20
print('Response status: ${response.statusCode}');
21
21
print('Response body: ${response.body}');
22
22
23
- print(await http.read('http ://example.com/foobar.txt'));
23
+ print(await http.read('https ://example.com/foobar.txt'));
24
24
```
25
25
26
26
If you're making multiple requests to the same server, you can keep open a
@@ -30,7 +30,7 @@ If you do this, make sure to close the client when you're done:
30
30
``` dart
31
31
var client = new http.Client();
32
32
try {
33
- var uriResponse = await client.post('http ://example.com/whatsit/create',
33
+ var uriResponse = await client.post('https ://example.com/whatsit/create',
34
34
body: {'name': 'doodle', 'color': 'blue'});
35
35
print(await client.get(uriResponse.bodyFields['uri']));
36
36
} finally {
You can’t perform that action at this time.
0 commit comments