1import 'package:http/http.dart' as http;
2
3var url = Uri.parse('https://example.com/whatsit/create');
4var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'});
5print('Response status: ${response.statusCode}');
6print('Response body: ${response.body}');
7
8print(await http.read('https://example.com/foobar.txt'));
9
1Future<http.Response> fetchAlbum() {
2 return http.get(Uri.https('jsonplaceholder.typicode.com', 'albums/1'));
3}