diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs index 5536cdd9c..afdae1941 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs @@ -338,6 +338,9 @@ namespace Duplicati.GUI.TrayIcon var response = await HTTPCLIENT.SendAsync(request, cts.Token); response.EnsureSuccessStatusCode(); + if (typeof(T) == typeof(string)) + return (T)(object)await response.Content.ReadAsStringAsync(); + using (var stream = await response.Content.ReadAsStreamAsync()) return await JsonSerializer.DeserializeAsync(stream, serializerOptions); }