invokeAPI method

Future<ApiResponse> invokeAPI(
  1. String path,
  2. Iterable<QueryParam> qParams,
  3. Object? body,
  4. List<String> authNames,
  5. Options options,
)

Implementation

Future<ApiResponse> invokeAPI(String path, Iterable<QueryParam> qParams,
    Object? body, List<String> authNames, Options options) async {
  // addAll(options?.headers?.cast<String, String>() ?? {});
  List<QueryParam> queryParams = [...qParams];
  Map<String, dynamic> headers = options.headers ?? {};

  _updateParamsForAuth(authNames, queryParams, headers);

  headers.addAll(_defaultHeaderMap);
  options.headers = headers;

  return apiClientDelegate.invokeAPI(
      basePath, path, queryParams, body, options,
      passErrorsAsApiResponses: passErrorsAsApiResponses);
}