http_plus 0.2.1 http_plus: ^0.2.1 copied to clipboard
package:http compatible client that can speak HTTP/2, maintain connections and fallback to HTTP/1.1.
example/http_plus_example.dart
import 'package:http_plus/http_plus.dart' as http;
void main() async {
// This example fetches Google homepage.
final url = Uri.https('google.com', '/');
// Await the http get response.
final response = await http.get(url);
print('Response status: ${response.statusCode}');
print('Response headers: ${response.headers}');
print('Response body: ${response.body}');
// Close all connections when not required.
http.closeAllConnections();
}