mirror of
https://github.com/Jackett/Jackett.git
synced 2025-10-02 08:34:32 +02:00
Fix charset setting for JsonContent
This commit is contained in:
@@ -17,12 +17,12 @@ namespace Jackett.Utils
|
|||||||
public JsonContent(object value)
|
public JsonContent(object value)
|
||||||
: this(value, Encoding.UTF8)
|
: this(value, Encoding.UTF8)
|
||||||
{
|
{
|
||||||
|
Headers.ContentType.CharSet = "utf-8";
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsonContent(object value, Encoding encoding)
|
public JsonContent(object value, Encoding encoding)
|
||||||
: base(JsonConvert.SerializeObject(value, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), encoding, "application/json")
|
: base(JsonConvert.SerializeObject(value, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), encoding, "application/json")
|
||||||
{
|
{
|
||||||
this.Headers.ContentType.CharSet = "utf-8";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user