Does anyone know if there is a replacement in ASP.NET 5 for HttpResponse.ContentEncoding? https://msdn.microsoft.com/en-us/library/system.web.httpresponse.contentencoding(v=vs.110).aspx
Replacement for HttpResponse.ContentEncoding ASP.NET 5
Asked Answered
Example:
var mediaType = new MediaTypeHeaderValue("application/json");
mediaType.Encoding = Encoding.UTF8;
httpContext.Response.ContentType = mediaType.ToString();
Microsoft.Framework.WebEncoders.EncoderExtensions
have HtmlEncode, JavaScriptStringEncode and UrlEncode extensions
and the base Class is Microsoft.Framework.WebEncoders
© 2022 - 2024 — McMap. All rights reserved.