Implement REST Calls Without (Too Much) Code with Refit
Writing your calls to the backend server can be tedious and repetitive. It's a lot of repeated code. In this video we will learn about Refit. With Refit you can just write an interface, configure the endpoints and HTTP verbs and the rest of the code will be generated for you 🤯 The sample is shown with a Xamarin.Forms app, but this works for any type of .NET project. 💝 Join this channel to get access to perks: https://www.youtube.com/channel/GeraldVersluis/join 🛑 Don't forget to subscribe to my channel for more amazing content: https://www.youtube.com/GeraldVersluis/?sub_confirmation=1 🐦 Follow me on Twitter: https://twitter.com/jfversluis 🤝 Join the MAUIverse Discord server: https://mauiverse.net/discord 🔗 Links Sample code repo: https://github.com/jfversluis/XFRefitSample ⏱ Timestamps 00:00 - Intro 00:17 - Inspect End Result 00:41 - Latest Member Shoutout 01:07 - Sample App Outline 06:00 - Install Refit NuGet Package 06:51 - NewtonSoft Json vs System.Text.Json 07:36 - Writing the REST API Interface 09:42 - Make Calls to REST API Through Refit 12:38 - An (Unintentional) Example of ApiException 13:59 - Running the Sample App 14:34 - Using Variables in Endpoint URLs 15:59 - Running Sample App Again 16:48 - Doing a POST With Refit 19:55 - Quick Look at the Refit Repo 21:12 - Outro 🎥 Video edited with Camtasia (ref): https://techsmith.z6rjha.net/AJoeD 🙋♂️ Also find my... Twitter: https://twitter.com/jfversluis Blog: https://blog.verslu.is #rest #refit #dotnet #csharp Twitch: https://twitch.tv/jfversluis All the rest: https://jfversluis.dev #Refit #API #REST #dotnet #reactiveui #xamarin #xamarinforms
Download
0 formatsNo download links available.