public ApiHelper(IApiPath apiPath)
        {
            _apiPath = apiPath;

            _client             = new HttpClient();
            _client.BaseAddress = new Uri(_apiPath.TokenUrl);
            _client.DefaultRequestHeaders.Accept.Clear();
            _client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        }
Пример #2
0
 public CategoryController(IApiHelper apiHelper, IApiPath apiPath)
 {
     _apiHelper = apiHelper;
     _apiPath   = apiPath;
 }
 public HomeController(IApiHelper apiHelper, IApiPath apiPath)
 {
     _apiHelper = apiHelper;
     _apiPath   = apiPath;
 }
Пример #4
0
 public DepartmentController(IApiHelper apiHelper, IApiPath apiPath)
 {
     _apiHelper = apiHelper;
     _apiPath   = apiPath;
 }