Intro to Refit REST API Client for C#

preview_player
Показать описание
Calling an API can be a pain. You have to use the HTTPClient correctly, you need to handle the return types, deserialize the data, and more. Or at least, you used to have to do all of that. Not anymore if you use Refit. Refit is an automatic type-safe REST library for Xamarin and .NET. In this video, we are going to set up an API and then call it from Blazor WebAssembly using Refit. You will be amazed at how easy it is to talk to an API.

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

Refit is an awesome tool to have in my toolbox.. thank you for the awesome introductory video 😇

Kyogunaik
Автор

This what I been looking for 🔥🔥 You rock Tim!!!

mogalemcbridemokgothu
Автор

Much quicker and easier solution than managing the http client on your own. Don't even want to mention unit testing. Great stuff!

milos
Автор

Awesome video, thank you. I have never heard about refit btw

raminguliyev
Автор

you are sooo good in explaiinning things!!!

TheJessejunior
Автор

Great intro to Refit and thanks for the explanation with @onclick="@(e => AddGuest(item))" @35:30 mark

steviepca
Автор

Absolutely interesting and helpful tools. Thanks a lot for sharing !

NAELSLR
Автор

While Refit reduces the amount of boilerplate code you have to write when integrating with an API to a minimum, and is nice to use for smaller APIs, I think it is more useful to use code generation for the client side, based on OpenAPI/Swagger doc (either from VS or other options like NSwag Studio). That is also very helpful in updating the code when the API is updated, and there is less room for error on the client side.

ppv
Автор

Great unique video, . I scoured the internet to find an example of creating a web api, using another project in your solution to call the api, but most of all there was no database, just creating lists to use in the Api..

joeprincipato
Автор

Excellent tool. Thanks you for another great video. Will use this in my projects.

ultroai
Автор

Thank you Tim!
This video tutorial help a lot make services simple

digitaldaridesatv
Автор

Great course!!!
Thank you, Thank you, Thank you.

jesusdelarua
Автор

Thank you for this tutorial <3, you are my favourite tutor here on youtube.

coding_ideas
Автор

Your issue with duplicated id was caused by your count + 1. But if you had used .Max(x => x.Id) + 1 it works :) It's easy to make mistakes in recordings :)

Great videos as usual! :)

PatricSjoeoe
Автор

I'm currently watching one of your other videos on APIs and then I'll do this one! Thank you so much Tim! I've managed to connect to the server and provide my authentication but I'm not quite to getting useful information out of it yet.

NavySturmGewehr
Автор

This is awesome. Reminds me a bit of the integration wizard for Web Services that comes with VS by default. Thanks for sharing!

mmurillo
Автор

Thanks for the tutorial. It will be very interesting to see one about progressive web apps

aande
Автор

As always :-) great Video. Great work *ThumbsUp

MarioStaats
Автор

Hi Tim! Thanks a lot. I`ve only one question: "How should I design the interface if the rest service sends an IActionResult back to caller instead of the awaited object?" Normally on an api call an IActionResult will be send back like Ok(...) or NotFound. THX. Jürgen

bytechanneltv
Автор

Hi Tim, How can I set The Content-Type to application/json in Refit

lcmarcosr