call method

Future<RequestResponse<FrappeResponse?>> call(
  1. Map<String, dynamic> args, {
  2. Map<String, dynamic> extraHeaders = const <String, dynamic>{},
  3. bool isFrappeResponse = true,
})

Method for calling custom cmds defined in the backend

Implementation

Future<RequestResponse<FrappeResponse?>> call(
  Map<String, dynamic> args, {
  Map<String, dynamic> extraHeaders = const <String, dynamic>{},
  bool isFrappeResponse = true,
}) {
  return Request.initiateRequest(
      url: config.hostUrl,
      method: HttpMethod.POST,
      headers: <String, dynamic>{
        ...RenovationRequestOptions.headers!,
        ...extraHeaders
      },
      contentType: ContentTypeLiterals.APPLICATION_JSON,
      data: args,
      isFrappeResponse: isFrappeResponse);
}