public HttpClient RestClientWithAuthorizaton()
        {
            var api = ApiSetting.Apis.FirstOrDefault(x => x.Address == BaseUri);

            if (api != null)
            {
                switch (api.EndpointCode)
                {
                case ApiCode.ApiServices:
                    httpClient = HttpClientConfSingleton.GetInstanceWithToken(BaseUri).HttpClient;
                    break;

                default:
                    httpClient             = new HttpClient();
                    httpClient.BaseAddress = new Uri(BaseUri);
                    httpClient.DefaultRequestHeaders.Accept.Clear();
                    httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    break;
                }
            }
            else
            {
                httpClient             = new HttpClient();
                httpClient.BaseAddress = new Uri(BaseUri);
                httpClient.DefaultRequestHeaders.Accept.Clear();
                httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            }

            return(httpClient);
        }
        public static HttpClientConfSingleton GetInstanceWithToken(string baseUrl)
        {
            if (httpClientSingleTonToken == null)
            {
                httpClientSingleTonToken = new HttpClientConfSingleton(baseUrl);
            }

            return(httpClientSingleTonToken);
        }