I m trying to access a website using my login credentials through an iPhone app but the NSLog
just shows the site with the login screen...I need the one AFTER the login screen. My code is as follows:
- (IBAction)buttonClicked:(id)sender
{
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"http://webportal.factorforms.com/Portal/Form_Login.aspx"]];
[request setPostValue:[self.usernameField text] forKey:@"Login1$UserName"];
[request setPostValue:[self.passwordField text] forKey:@"Login1$Password"];
[request setDelegate:self];
[request startAsynchronous];
}
- (void)requestFailed:(ASIHTTPRequest *)request {
NSLog(@"Request failed: %@",[request error]);
}
- (void)requestFinished:(ASIHTTPRequest *)request {
NSLog(@"Submitted form successfully");
NSLog(@"Response was:");
NSLog(@"%@",[request responseString]);
}
My response is just the log in screen....I thought I would be getting the javascript for my actual login. I m not sure what I m doing wrong.