Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Refit
1. Refit
Refit is a Helper library made by ReactiveUI which
automatically converts our Rest APIs into a live interface.
So we can say it’s an automatic type-safe REST library.
To Know more click here
2. Why Do we Need Refit Library ?
Developer make so many mistakes while calling
the rest APIs
Refit can save us from all of these by converting all
the APIs in live Interface, eliminating all the
(de)serialization business in his hand so
developers don’t have to worry about typose, url
or any king of mistake related to Rest APIs.
3. How does Refit works ?
you create an Interface with Attributes(attributes
defined by Refit like Get, Post, Put, Delete, AliasAs,
Body etc..) and automatically creates the
Implementation of the Interface accordingly.
And developer make an instance of that interface
type and can directly use the methods available in
that interface
4. scenarios where Refit is usefull
• Scenario one where API Developer haven't share
any Contract You need to use the API with
minimum mistake,
• Scenario two where You are an API Developer
and you don't want API users to struggle your
Library.