I am learning Blazor from below Microsoft's tutorial.
When I write part, I want to use "ResponseCompressionDefaults" function, but there is red line below at my editor like screenshot.
how can I load "ResponseCompressionDefaults" function on my editor?
Please, help me.
public void ConfigureServices(IServiceCollection services)
{
services.AddSignalR();
services.AddControllersWithViews();
services.AddRazorPages();
services.AddResponseCompression(opts =>
{
opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(
new[] { "application/octet-stream" });
});
}
you need a using statement for this to work:
using Microsoft.AspNetCore.ResponseCompression;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.