run static method
Invokes a cloud function named name
with params
and receives a Map
or List
.
Implementation
static Future run(String name, {Map<String, dynamic>? params}) async {
String path = 'functions/$name';
Map<String, dynamic> headers = {'X-LC-Prod': isProd ? 1 : 0};
return await LeanCloud._httpClient
.post(path, headers: headers, data: params ?? {});
}