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
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.
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
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.
Examples_
• https://github.com/NakWarsi/Simplified_RestSample

Refit

  • 1.
    Refit Refit is aHelper 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 weNeed 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 Refitworks ? 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 Refitis 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.
  • 5.