public static void getRefreshStatus(RefreshStatus refreshStatus) { Console.WriteLine(refreshStatus.toString()); //Keep Polling this api to get RefreshStatus : for (int i = 0; i < 10; i++) { getRefreshStatus(refreshStatus.getProviderAccountId()); } }
public static RefreshStatus getRefreshStatus(String providerAccountId) { //String mn = "getRefreshStatus( " + providerAccountId.ToString() + " )"; //Console.WriteLine(fqcn + " :: " + mn); String getRefreshStatusURL = LoginApp.localURLVer1 + "refresh/" + providerAccountId.ToString(); List <string> headers = new List <string>(); string usersessionid = LoginApp.usession; string cbrandsessionid = LoginApp.cbsession; headers.Add("Authorization:{userSession= " + usersessionid + ",cobSession=" + cbrandsessionid + "}"); String jsonResponse = HTTP.doGet(getRefreshStatusURL, headers); // Console.WriteLine(jsonResponse); RefreshStatus refreshStatus = (RefreshStatus)GSONParser.handleJson(jsonResponse, typeof(RefreshStatus)); Console.WriteLine(refreshStatus.toString()); return(refreshStatus); }