getAsync method

Future getAsync(
  1. String endPoint
)

Implementation

Future<dynamic> getAsync(String endPoint) async {
  String url = this._getOAuthURL("GET", endPoint);

  try {
    final http.Response response = await http.get(Uri.parse(url));
    if (response.statusCode == 200) {
      return json.decode(response.body);
    }
    _handleError(response);
  } on SocketException {
    throw Exception('No Internet connection.');
  }
}