Working With HTTP Response Headers in ASP.NET Core Middleware

preview_player
Показать описание
Asp.Net Core MIddleware is a powerful tool to execute code both on the incoming HTTP request and on the outgoing HTTP response. However, things are not always working as advertised. And if you want to manipulate HTTP response headers in Asp.Net Core Middleware, you might get some nasty exceptions! So, Join me in this video to learn everything you need to know on how to properly work with HTTP response headers in ASP.NET Core
#aspnetcore #dotnet #csharp

Join this channel to get source code access and other perks:

Also follow me here (especially if you are a self taught developer):

Contents:
1. Intro: 00:00
2. Response headers in Asp.Net Core middleware: 00:50
3. Understanding HTTP streaming: 03:42
4. The OnStarting method: 05:05
6. Words of caution! 07:31

My setup:
Рекомендации по теме
Комментарии
Автор

Man, every video uploaded in this channel is a mind blowing lesson. So glad I found this channel!

khutsokobela
Автор

Clear and concise as always !
Thank you Dan

KenzoArts
Автор

Very interesting topic. Best compliment! Clear explication as usual. Thanks so much Dan

danielegiovanetti
Автор

Thank you Codewrinkles. Can't wait to learn more from you. 👍

ramfattah
Автор

Hi and thanks for informational video. I needed to ask - here 8:06 you mean using multiple OnStarting() on 1 middleware (if u meaned this then i understand you mean)? or you mean using OnStarting() method in different middlewares (i cant understand here - how can/will callbacks work in reversed order, if middlewares have his own work order)?

RoyZASTEROiD
Автор

It is very interesting. Today I was working on a way to manipulate the actual response body. Minimal API does not have a way to do content negotiation and as such only responds with JSON data. What if I for example want to send XML data instead? I need a way (a filter perhaps) that checks the incoming header and when a Accept header is sent with "application/xml" it would modify the response and instead sends XML. So far I have not been able to be successful unfortunately but your content is helpful nonetheless as it helps me understand the whole process better.

dennisvandermeer