public ApiService() { HttpClient httpClient = new HttpClient(new CustomHttpClientHandler()) { BaseAddress = new Uri(ApiServiceKeys.ApiServiceBaseUrl) }; refitApiService = RestService.For <IRefitApiService>(httpClient); }
public MainViewModel() { Titulo = "Consumindo API"; Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged; _ApiServiceRefit = RestService.For <IRefitApiService>(Constantes.ApiBaseUrl); Pokemons = new ObservableCollection <Pokemon>(); CarregarHttpExtensionCommand = new Command(ExecuteCarregarHttpExtensionCommand); CarregarRefitCommand = new Command(ExecuteCarregarRefitCommand); CarregarFlurlCommand = new Command(ExecuteCarregarFlurlCommand); }