diff options
-rw-r--r-- | src/SMAPI.Web/Framework/Clients/UpdateManifest/TextAsJsonMediaTypeFormatter.cs | 19 | ||||
-rw-r--r-- | src/SMAPI.Web/Framework/Clients/UpdateManifest/UpdateManifestClient.cs | 4 |
2 files changed, 3 insertions, 20 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/UpdateManifest/TextAsJsonMediaTypeFormatter.cs b/src/SMAPI.Web/Framework/Clients/UpdateManifest/TextAsJsonMediaTypeFormatter.cs deleted file mode 100644 index 02722cb1..00000000 --- a/src/SMAPI.Web/Framework/Clients/UpdateManifest/TextAsJsonMediaTypeFormatter.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 Jamie Taylor -using System.Net.Http.Formatting; -using System.Net.Http.Headers; - -namespace StardewModdingAPI.Web.Framework.Clients.UpdateManifest -{ - /// <summary>A <see cref="JsonMediaTypeFormatter"/> that can parse from content of type <c>text/plain</c>.</summary> - internal class TextAsJsonMediaTypeFormatter : JsonMediaTypeFormatter - { - /********* - ** Public methods - *********/ - /// <summary>Construct a new <see cref="JsonMediaTypeFormatter"/></summary> - public TextAsJsonMediaTypeFormatter() - { - this.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/plain")); - } - } -} diff --git a/src/SMAPI.Web/Framework/Clients/UpdateManifest/UpdateManifestClient.cs b/src/SMAPI.Web/Framework/Clients/UpdateManifest/UpdateManifestClient.cs index 88a5c2f6..0199027f 100644 --- a/src/SMAPI.Web/Framework/Clients/UpdateManifest/UpdateManifestClient.cs +++ b/src/SMAPI.Web/Framework/Clients/UpdateManifest/UpdateManifestClient.cs @@ -1,5 +1,6 @@ // Copyright 2022 Jamie Taylor using System.Net; +using System.Net.Http.Headers; using System.Threading.Tasks; using Pathoschild.Http.Client; using StardewModdingAPI.Toolkit.Framework.UpdateData; @@ -32,7 +33,8 @@ namespace StardewModdingAPI.Web.Framework.Clients.UpdateManifest { this.Client = new FluentClient() .SetUserAgent(userAgent); - this.Client.Formatters.Add(new TextAsJsonMediaTypeFormatter()); + + this.Client.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/plain")); } /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary> |