I am trying to develop an app which will use this Cytamobile-Vodafone webservice to login.
I have used HTTP Live Header add-on with Mozilla to get this one: %3D&HeaderLogin1%24CybeeUserName1%24txtUserName=mavris&HeaderLogin1%24CybeePassword1%24txtPassword=XXXXX&HeaderLogin1%24ibtnLogin.x=20&HeaderLogin1%24ibtnLogin.y=4 HTTP/1.1 302 Found
First I noticed that ibtnLogin.x and ibtnLogin.y have not the same value each time I am trying to login.
Second I wrote this code:
-(IBAction) buttonpressed {
NSURL *url = [NSURL URLWithString:@"https://www.cytamobile-vodafone.com/miPortal/HeaderLoginBar.aspx"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"xxxxxx" forKey:@"txtUserName"];
[request setPostValue:@"xxxxxx" forKey:@"txtPassword"];
[request setPostValue:@"31" forKey:@"ibtnLogin.x"];
[request setPostValue:@"7" forKey:@"ibtnLogin.y"];
[request setDelegate:self];
[request startAsynchronous];
[self requestFinished:request];
}
- (void)requestFinished:(ASIFormDataRequest *)request
{
// Use when fetching text data
NSString *responseString = [request responseStatusMessage];
NSLog(@"Output = %@",responseString);
}
and I get:
"Output = HTTP/1.1 200 OK" instead of 302 Found or any other error
What am I doing wrong here?