use UTF8 as encoding in restutility

This commit is contained in:
Ryan Peters 2021-04-20 17:10:57 -04:00
parent 05a59f4d4f
commit 663d952739

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Text;
namespace BinaryDad.Extensions namespace BinaryDad.Extensions
{ {
@ -148,7 +149,7 @@ namespace BinaryDad.Extensions
if (body != null) if (body != null)
{ {
var serializedBody = body.Serialize(); var serializedBody = body.Serialize();
var bytes = System.Text.Encoding.GetEncoding("iso-8859-1").GetBytes(serializedBody); var bytes = Encoding.UTF8.GetBytes(serializedBody);
request.ContentLength = bytes.Length; request.ContentLength = bytes.Length;