diff --git a/Storage/Storage/Public/LCCloud.cs b/Storage/Storage/Public/LCCloud.cs index 3fbe1ba..3f7ec40 100644 --- a/Storage/Storage/Public/LCCloud.cs +++ b/Storage/Storage/Public/LCCloud.cs @@ -30,7 +30,7 @@ namespace LeanCloud.Storage { Dictionary headers = new Dictionary { { PRODUCTION_KEY, IsProduction ? 1 : 0 } }; - object encodeParams = LCEncoder.Encode(parameters); + object encodeParams = LCEncoder.Encode(parameters ?? new Dictionary()); Dictionary response = await LCCore.HttpClient.Post>(path, headers: headers, data: encodeParams); @@ -59,7 +59,8 @@ namespace LeanCloud.Storage { /// Cloud function name. /// Parameters of cloud function. /// LCObject, List, or Map. - public static async Task RPC(string name, object parameters = null) { + public static async Task RPC(string name, + object parameters = null) { string path = $"call/{name}"; Dictionary headers = new Dictionary { { PRODUCTION_KEY, IsProduction ? 1 : 0 }