BIMToolkitAPIClient.Dal.ApiAccess.CallApi C# (CSharp) Method

CallApi() public static method

Get a token before making a GET request to the specified api path
public static CallApi ( string path ) : string
path string
return string
        public static string CallApi(string path)
        {
            string token = GetToken();
            //string token = GetTokenExplained();
            var client = new HttpClient();
            client.SetBearerToken(token);

            return client.GetStringAsync(ConfigurationManager.AppSettings["Api"] + "/" + path).Result;
        }