If you are a C# Developer, I have a Software Testing roadmap designed for you: guiferreira.me/resources/software-testing-roadmap-dotnet
@charlesopuoro52957 ай бұрын
Absolutely enlightening. Thank you. Just subscribed and I'll be back for more.
@gui.ferreira7 ай бұрын
Thanks Charles! Glad you find it worthy
@andreasbrunnstrom8458 Жыл бұрын
Thanks, I had not though about that case where you cancel the exception.. very interesting.
@gui.ferreira Жыл бұрын
Thank you 🙏 That is a tricky one. And since it's rare, it often goes unnoticed
@GarethDoherty1985 Жыл бұрын
Does this work exactly the same on a SPA application. I build Web Client Apps using Blazor. I am on a page and press a button to send an API call to the server to get data (lets say its long running) and when I navigate to another page, that Request to the API isn't cancelled, and I assume that's because there wasn't a browser "refresh" that happened. So in a SPA situation where request cancellations don't happen between page navigations, how would you make the request cancel if you navigate to a different page. I notice that when users load my app, they land on the Dashboard page which makes a lot of calls to the API to get data from the DB to populate charts etc. But they very quickly navigate to another page in the Blazor App, before the request finish and charts are rendered etc, but all those API calls from the Client to the API continue anyway.
@gui.ferreira Жыл бұрын
That's a brilliant question! I'm not a Blazor expert, but that makes sense to me. In a SPA, in fact, there's no reason to "automatically" cancel the request. But, I think this is what you are looking for: steven-giesel.com/blogPost/69051bce-81b6-410c-9b9e-c2a0f1c88371 Combine the article with the content of this video, and it should work!
@Tamer_Ali Жыл бұрын
Thanks a lot Gui, you awesome 👍
@gui.ferreira Жыл бұрын
Thank you 🙏
@vivekkaushik9508 Жыл бұрын
Love the thumbnail 😂😂😂❤
@gui.ferreira Жыл бұрын
Captured by the International Space Station 👨🚀
@alefsilva2541 Жыл бұрын
Boa! Mestre!
@gui.ferreira Жыл бұрын
Obrigado!
@ardavaztterterian1211 Жыл бұрын
i dont understand on how reloading the page, will effect the previous request and how the cancellation token is passed. can someone explain?
@gui.ferreira Жыл бұрын
On a F5 the connection of the ongoing HTTP request will stop and start a new one. The web server will know that. Then, asp.net will let you know that through the form of a cancellation token that the first request was cancelled.
@ardavaztterterian1211 Жыл бұрын
@@gui.ferreira I like your content, but I wish you showed that in action. instead we got a 5 minute lecture with slides. Programming shouldn't be done like that.
@gui.ferreira Жыл бұрын
@@ardavaztterterian1211 Thanks for the feedback 🙏 I've been trying some new things. Still trying to get it as I want. Feedback is welcome.
@thanzeeljalaldeen11 ай бұрын
should POST requests also use cancellation token? or is it only for GET requests?
@gui.ferreira11 ай бұрын
A POST can use it too. Example: If you want to abort a db transaction when a request is cancelled.