0

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.

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.