Skip to content

Instantly share code, notes, and snippets.

@hamid-shaikh
Created July 14, 2019 08:43
Show Gist options
  • Save hamid-shaikh/803e88151281e24bc07fba2a4903cc49 to your computer and use it in GitHub Desktop.
Save hamid-shaikh/803e88151281e24bc07fba2a4903cc49 to your computer and use it in GitHub Desktop.
Refit + Prism Forms + Fusillade + ModernHttpClient
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
}