有谁知道 ASP.NET 5 中是否有 HttpResponse.ContentEncoding 的替代品? https://msdn.microsoft.com/en-us/library/system.web.httpresponse.contentencoding(v=vs.110).aspx
最佳答案
例子:
var mediaType = new MediaTypeHeaderValue("application/json");
mediaType.Encoding = Encoding.UTF8;
httpContext.Response.ContentType = mediaType.ToString();
关于asp.net-core - 替代 HttpResponse.ContentEncoding ASP.NET 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31320263/