Hi All,
I am doing the response compression using GZip provider, I wrote the below code in Startup.cs class
services.AddResponseCompression(options =>
{
options.EnableForHttps = true;
options.Providers.Add();
});
services.Configure(options =>
{
options.Level = CompressionLevel.Fastest;
});
By using the above code, for all API endpoints, the response will be compressed since I have added the above code in startup class, but I want to compress the response only for one endpoint rather compressing for all endpoints.
By using the above code, for all API endpoints, the response will be compressed since I have added the above code in startup class, but I want to compress the response only for one endpoint rather compressing for all endpoints.
so can anyone help me how to do only for the specific API controller endpoint?
Replies
Know the answer? Post it — somebody with the same question will find it here.