Get function

dynamic Get(
  1. String url
)

Implementation

Get(String url) async {
  try {
    var res = await http.get(Uri.parse(url));
    if (res.statusCode == 200) {
      return res.body;
    } else if (res.statusCode == 404) {
      throw NotFoundError("App not found(404).");
    } else {
      throw ExtraHTTPError(
          "App not found. Status code ${res.statusCode} returned.");
    }
  } catch (e) {
    rethrow;
  }
}