Implement REST Calls Without (Too Much) Code with Refit

Gerald Versluis
Gerald Versluis
9.2 هزار بار بازدید - 3 سال پیش - Writing your calls to the
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.seevid.ir/fa/result?ytch=Geral...

🛑 Don't forget to subscribe to my channel for more amazing content: https://www.youtube.com/GeraldVerslui...

🐦 Follow me on Twitter: Twitter: jfversluis
🤝 Join the Discord server: Discord: discord

🔗 Links
Sample code repo: https://github.com/jfversluis/XFRefit...

⏱ 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: Twitter: jfversluis
Blog: https://blog.verslu.is

#rest #refit #dotnet #csharp
Twitch: Twitch: jfversluis
All the rest: https://jfversluis.dev

#Refit #API #REST #dotnet #reactiveui #xamarin #xamarinforms
3 سال پیش در تاریخ 1400/04/07 منتشر شده است.
9,248 بـار بازدید شده
... بیشتر