get method
Implementation
Future<OpenSslHttpResponse> get(
Uri uri, {
Duration timeout = const Duration(seconds: 5),
Map<String, String> headers = const {},
}) async {
if (uri.scheme == 'http') {
return _getHttp(uri, timeout: timeout, headers: headers);
}
if (uri.scheme == 'https') {
return _getHttps(uri, timeout: timeout, headers: headers);
}
throw ArgumentError('Unsupported scheme: ${uri.scheme}');
}