call method

Future<Map<String, dynamic>> call(
  1. String uri,
  2. {Map<String, dynamic> body,
  3. Map<String, String> headers,
  4. HttpMethod method = HttpMethod.post}
)

Implementation

Future<Map<String, dynamic>> call(
  String uri, {
  Map<String, dynamic> body,
  Map<String, String> headers,
  HttpMethod method = HttpMethod.post,
}) async {
  final appToken = await getAppToken();
  final Map<String, dynamic> requestBody = body != null ? body : {};
  requestBody['access_token'] = appToken;
  return _execMethod(
    uri,
    false,
    retries,
    method,
    body: requestBody,
    headers: headers,
  );
}