invoke method

FutureOr<Map> invoke({
  1. required String uriPath,
  2. Map<String, dynamic>? uriQueryParameters,
  3. Map? parameters,
  4. Map? headersParameters,
  5. GithubClientAuth? githubClientAuth,
  6. String? githubApiVersion,
  7. List<int>? statusCodes,
  8. String? keyResultList,
  9. String method_request = "get",
  10. String specialTypeName = "ok",
})

Implementation

FutureOr<Map> invoke({
  required String uriPath,
  Map<String, dynamic>? uriQueryParameters,
  Map? parameters,
  Map? headersParameters,
  GithubClientAuth? githubClientAuth,
  String? githubApiVersion,
  List<int>? statusCodes,
  String? keyResultList,
  String method_request = "get",
  String specialTypeName = "ok",
}) async {
  int try_count = 0;
  while (true) {
    await Future.delayed(Duration(microseconds: 1));

    try {
      return await _invokeRaw(
        uriPath: uriPath,
        uriQueryParameters: uriQueryParameters,
        parameters: parameters,
        headersParameters: headersParameters,
        githubClientAuth: githubClientAuth,
        githubApiVersion: githubApiVersion,
        statusCodes: statusCodes,
        method_request: method_request,
        specialTypeName: specialTypeName,
        keyResultList: keyResultList,
      );
    } catch (e) {
      if (try_count >= 3) {
        rethrow;
      }
      try_count++;
      if (e is ClientException) {
        continue;
      } else {
        rethrow;
      }
    }
  }
}