diff --git a/Appwrite/Appwrite.csproj b/Appwrite/Appwrite.csproj
index aa58a56b..4d16cb8e 100644
--- a/Appwrite/Appwrite.csproj
+++ b/Appwrite/Appwrite.csproj
@@ -2,7 +2,7 @@
netstandard2.0;net462
Appwrite
- 8.2.0
+ 9.0.0
Appwrite Team
Appwrite Team
@@ -20,7 +20,7 @@
-
+
diff --git a/Appwrite/Client.cs b/Appwrite/Client.cs
index 8d7b21eb..36be1cd5 100644
--- a/Appwrite/Client.cs
+++ b/Appwrite/Client.cs
@@ -77,12 +77,12 @@ public Client(
_headers = new Dictionary()
{
{ "content-type", "application/json" },
- { "user-agent", $"AppwriteDotNetSDK/8.2.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
+ { "user-agent", $"AppwriteDotNetSDK/9.0.0 ({Environment.OSVersion.Platform}; {Environment.OSVersion.VersionString})"},
{ "x-sdk-name", ".NET" },
{ "x-sdk-platform", "server" },
{ "x-sdk-language", "dotnet" },
- { "x-sdk-version", "8.2.0"},
- { "X-Appwrite-Response-Format", "2.0.0" }
+ { "x-sdk-version", "9.0.0"},
+ { "X-Appwrite-Response-Format", "2.4.0" }
};
_config = new Dictionary();
@@ -188,15 +188,6 @@ public Client SetForwardedUserAgent(string value)
return this;
}
- /// Your secret dev API key
- public Client SetDevKey(string value)
- {
- _config["devKey"] = value;
- AddHeader("X-Appwrite-Dev-Key", value);
-
- return this;
- }
-
/// The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.
public Client SetCookie(string value)
{
@@ -269,13 +260,13 @@ private HttpRequestMessage PrepareRequest(
foreach (var parameter in parameters)
{
if (parameter.Value == null) continue;
- if (parameter.Key == "file")
+ if (parameter.Value is MultipartFormDataContent fileContent)
{
- var fileContent = parameters["file"] as MultipartFormDataContent;
- if (fileContent != null)
- {
- form.Add(fileContent.First()!);
- }
+ form.Add(fileContent.First()!);
+ }
+ else if (parameter.Value is System.Collections.IDictionary)
+ {
+ form.Add(new StringContent(JsonSerializer.Serialize(parameter.Value, SerializerOptions)), parameter.Key);
}
else if (parameter.Value is IEnumerable