pingUrl method
Implementation
Future<bool> pingUrl(String url) async {
try {
final Uri uri = Uri.parse(url);
var request = new http.Request("GET", uri);
await httpClient.send(request);
return true;
} catch (e) {
return false;
}
}