Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void) viewDidLoad
- {
- responseData = [NSMutableData new];
- NSString *url = @"http://gensure.in/google/sys/FormToken.ashx";
- NSString *strParameter = [NSString stringWithFormat:@"user=%@&password=%@", @"admin",@"pass"];
- NSString *strResponse = [self httpSync:@"POST":url :strParameter];
- RDataParser *rDParse = [[RDataParser alloc]initWithClass:nil :[strResponse dataUsingEncoding:NSUTF8StringEncoding] :false];
- if ([rDParse.arrElementData count]>0){
- // [RSession setSessionForBool:false :@"isloggedin"];
- // UIWindow *window=[UIApplication sharedApplication].keyWindow;
- // UIViewController *root = [window rootViewController];
- // UIStoryboard *storyboard=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"RLoginVC"];
- [RSession setSession:[rDParse.arrElementData objectAtIndex:0] :@"tokenDetails"];
- NSLog(@"Token:%@",[rDParse.arrElementData objectAtIndex:0]);
- NSString *str_url = @"http://gensure.in/google/sys/formsql.ashx?sqlkey=430cfb3f-2936-4927-b37d-82dc149b9cfd&p1=&p2=";
- str_url =[NSString stringWithFormat:@"%@&token=%@",str_url,[self getToken]];
- // NSURL *url = [NSURL URLWithString:str_url];
- NSString *str_Response = [self getDataFrom:str_url];
- str_Response = str_Response;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement