oldget method

Future oldget(
  1. String endPoint
)

Implementation

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

  http.Client client = http.Client();
  http.Request request = http.Request('GET', Uri.parse(url));
  request.headers[HttpHeaders.contentTypeHeader] =
      'application/json; charset=utf-8';
  //request.headers[HttpHeaders.authorizationHeader] = _token;
  request.headers[HttpHeaders.cacheControlHeader] = "no-cache";
  String response =
      await client.send(request).then((res) => res.stream.bytesToString());
  var dataResponse = await json.decode(response);
  _handleError(dataResponse);
  return dataResponse;
}