pingUrl method

Future<bool> pingUrl(
  1. String url
)

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;
  }
}