Пример #1
0
 public MvpApiService(IAnalyticsService analyticsService)
 {
     this.analyticsService = analyticsService;
     api = RestService.For <IMvpApi>(new HttpClient(new AuthenticatedHttpClientHandler(GetToken))
     {
         BaseAddress = new Uri("https://mvpapi.azure-api.net/mvp/api/")
     });
 }
Пример #2
0
        public MvpApiService(IAnalyticsService analyticsService)
        {
            this.analyticsService = analyticsService;

#if DEBUG
            api = RestService.For <IMvpApi>(new HttpClient(new HttpLoggingHandler(new AuthenticatedHttpClientHandler(GetToken)))
            {
                BaseAddress = new Uri(Constants.ApiUrl)
            });
#else
            api = RestService.For <IMvpApi>(new HttpClient(new AuthenticatedHttpClientHandler(GetToken))
            {
                BaseAddress = new Uri(Constants.ApiUrl)
            });
#endif
        }