I added a response header with reference to this following page: How to add custom header to ASP.NET Core Web API response
I wrote:
ObjectResult result = new ObjectResult("aaa");
Request.HttpContext.Response.ContentType = "text/html; charset=shift_jis";
Request.HttpContext.Response.Headers.Add("IPAddress", "10.11.12.13");
Request.HttpContext.Response.Headers.Add("name", "Naoki");
I'd like to change the charset not only Response Body, but also Response Header. For example, "Naoki" and "10.11.12.13".Because double-byte characters are inserted in production data in Response Header.
How to change the charset in Response Header? Best Regards.