diff options
Diffstat (limited to 'Jellyfin.Server/Formatters/XmlOutputFormatter.cs')
| -rw-r--r-- | Jellyfin.Server/Formatters/XmlOutputFormatter.cs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/Jellyfin.Server/Formatters/XmlOutputFormatter.cs b/Jellyfin.Server/Formatters/XmlOutputFormatter.cs deleted file mode 100644 index be0baea2d..000000000 --- a/Jellyfin.Server/Formatters/XmlOutputFormatter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net.Mime; -using System.Text; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc.Formatters; - -namespace Jellyfin.Server.Formatters -{ - /// <summary> - /// Xml output formatter. - /// </summary> - public class XmlOutputFormatter : TextOutputFormatter - { - /// <summary> - /// Initializes a new instance of the <see cref="XmlOutputFormatter"/> class. - /// </summary> - public XmlOutputFormatter() - { - SupportedMediaTypes.Clear(); - SupportedMediaTypes.Add(MediaTypeNames.Text.Xml); - - SupportedEncodings.Add(Encoding.UTF8); - SupportedEncodings.Add(Encoding.Unicode); - } - - /// <inheritdoc /> - public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) - { - var stringResponse = context.Object?.ToString(); - return stringResponse == null ? Task.CompletedTask : context.HttpContext.Response.WriteAsync(stringResponse); - } - } -} |
