Fix charset setting for JsonContent

This commit is contained in:
kaso17 2017-02-02 11:07:47 +01:00
parent 0f7ff3fb06
commit c43ff9ff49
1 changed files with 1 additions and 1 deletions

View File

@ -17,12 +17,12 @@ namespace Jackett.Utils
public JsonContent(object value)
: this(value, Encoding.UTF8)
{
Headers.ContentType.CharSet = "utf-8";
}
public JsonContent(object value, Encoding encoding)
: base(JsonConvert.SerializeObject(value, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), encoding, "application/json")
{
this.Headers.ContentType.CharSet = "utf-8";
}
}
}