get function
Implementation
Future<http.Response> get(String url, {Map<String, String>? headers, int? timeOut}) async {
final Map<String, dynamic> request = {
"method": "GET",
"url": url,
"headers": headers ?? const <String, String>{},
"timeOut": Duration(seconds: timeOut ?? _timeOut).inMilliseconds
};
if (_useNative){
return await _sendRequest(request);
} else {
return await http.get(
Uri.parse(url),
headers: headers
).timeout(Duration(seconds: timeOut ?? _timeOut));
}
}