Quickly Consume a REST API in a .NET Application - REFIT

Опубликовано: 05 Октябрь 2024
на канале: SingletonSean
6,869
145

Learn how to use Refit to easily consume a REST API. In this demo, I consume the REST API from my JWT authentication series. I also demonstrate how to setup an automatic token refresh flow on the client.

Although this demo uses Refit to consume a local .NET REST API, Refit can be used to quickly consume any REST API.

TIMESTAMPS:
0:00 - Introduction
1:21 - Installing Refit
1:44 - Demo API Introduction
3:05 - Creating a Refit Service
6:10 - Using the Refit Service
8:08 - Setting Up the Other Refit Services
12:07 - Passing the Access Token to the Data Server
17:52 - Implementing the Automatic Token Refresh
21:59 - Handling Refit Exceptions
13:19 - Conclusion

GET POSTMAN: https://www.postman.com/downloads/

HTTPS REDIRECTION ISSUE: https://stackoverflow.com/a/28671822

SOURCE CONTROL: https://github.com/SingletonSean/auth...

OTHER LINKS:
Become a Member:    / @singletonsean  
Donations: https://www.paypal.com/biz/fund?id=UB...