Created
July 14, 2019 08:43
-
-
Save hamid-shaikh/803e88151281e24bc07fba2a4903cc49 to your computer and use it in GitHub Desktop.
Refit + Prism Forms + Fusillade + ModernHttpClient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Refit; | |
public interface IAuthenticationService | |
{ | |
[Get("/auth/basiclogin")] | |
Task<TResult> AuthenticateUserAsync<TResult>([Header("Authorization")] string authorization); | |
[Get("/auth/logout")] | |
Task<TResult> LogoutUserAsync<TResult>(); | |
//Important keeping result type as generic which will help you to get desired return type | |
//eg:- LogoutUserAsync<HttpResponseMessage>() Getting HttpResponseMessage will help you find exception when service call is failing / deserialization is failing. | |
// LogoutUserAsync<LogoutResponseModel>() Expected Type | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Step 1 : - https://gist.github.com/hamid-shaikh/24d93419f9b5313685c4dfc40f4b59dc
Step 2 : - https://gist.github.com/hamid-shaikh/7a766529e79cea8e108d53c657ca1594
Step 3 : - https://gist.github.com/hamid-shaikh/803e88151281e24bc07fba2a4903cc49
Step 4 : - https://gist.github.com/hamid-shaikh/082fea0c0bb3accc7c1db180d81a9884
Step 5 : - https://gist.github.com/hamid-shaikh/0774fe04cf7121c0d596925c93fc1809