From aaceb603b8b5a13c0ad12e5c8fecfb42f475a583 Mon Sep 17 00:00:00 2001 From: yyuueexxiinngg Date: Mon, 17 Aug 2020 12:12:15 +0800 Subject: [PATCH] Set charset parameter to content-type header in report service. Close #37 --- src/main/kotlin/tech/mihoyo/mirai/web/http/ReportService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/tech/mihoyo/mirai/web/http/ReportService.kt b/src/main/kotlin/tech/mihoyo/mirai/web/http/ReportService.kt index 618a2d1..e17785b 100644 --- a/src/main/kotlin/tech/mihoyo/mirai/web/http/ReportService.kt +++ b/src/main/kotlin/tech/mihoyo/mirai/web/http/ReportService.kt @@ -127,7 +127,7 @@ class ReportService( } } method = HttpMethod.Post - body = TextContent(json, ContentType.Application.Json) + body = TextContent(json, ContentType.Application.Json.withParameter("charset", "utf-8")) } logger.debug("收到上报响应 $res") if (shouldHandleOperation && res != null && res != "") {