TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Priya Avanigadda
NA
87
8.3k
Route specific response compression in dotnet core 2 asp.net
Oct 4 2019 5:54 AM
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<GzipCompressionProvider>();
});
services.Configure<GzipCompressionProviderOptions>(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.
so can anyone help me how to do only for the specific API controller endpoint?
Reply
Answers (
0
)
Multi TCP Client in single application with multi TCP server
How to send keystroke to 3rd party desktop application