diff --git a/src/BitzArt.Flux.REST/Models/FluxRestSetContext{TModel}.cs b/src/BitzArt.Flux.REST/Models/FluxRestSetContext{TModel}.cs index 24a7d26..3f903f8 100644 --- a/src/BitzArt.Flux.REST/Models/FluxRestSetContext{TModel}.cs +++ b/src/BitzArt.Flux.REST/Models/FluxRestSetContext{TModel}.cs @@ -1,6 +1,7 @@ using BitzArt.Pagination; using Microsoft.Extensions.Logging; using System.Linq.Expressions; +using System.Text; using System.Text.Json; using System.Web; @@ -133,7 +134,7 @@ public override async Task AddAsync(TModel model, params o var jsonString = JsonSerializer.Serialize(model, ServiceOptions.SerializerOptions); var message = new HttpRequestMessage(HttpMethod.Post, parse.Result) { - Content = new StringContent(jsonString) + Content = new StringContent(jsonString, Encoding.UTF8, "application/json") }; var result = await HandleRequestAsync(message); @@ -160,7 +161,7 @@ public override async Task UpdateAsync(object? id, TModel var message = new HttpRequestMessage(method, path.Result) { - Content = new StringContent(jsonString) + Content = new StringContent(jsonString, Encoding.UTF8, "application/json") }; var result = await HandleRequestAsync(message);