finish tables api

This commit is contained in:
2023-10-03 11:44:53 +02:00
parent 7ad077d0cf
commit ba069d56fd
8 changed files with 62 additions and 11 deletions

View File

@@ -175,8 +175,11 @@ namespace Pilz.Networking.CloudProviders.Nextcloud.Ocs
// Create content
if (content is HttpContent contentHttp)
httpContent = contentHttp;
else if (content is OcsData)
httpContent = new StringContent(JsonConvert.SerializeObject(content), null, CONTENT_TYPE_JSON);
else if (content is OcsData || content is not null)
{
var stringContent = JsonConvert.SerializeObject(content);
httpContent = new StringContent(stringContent, null, CONTENT_TYPE_JSON);
}
else
httpContent = null;