Question

I need to login here. I've tried the ASIHTTPRequest and ASIFormDataRequest.

None of them works as expected. I only got the data from the loginpage in the response string, not the data from the secure area.

What am I doing wrong here?

    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"https://www.blau.de/"]];
[request setPostValue:@"USERNAME" forKey:@"quickLoginNumber"];
[request setPostValue:@"PASSWORD" forKey:@"quickLoginPassword"];

[request startAsynchronous];
Was it helpful?

Solution

There are a couple of good tools you can use to try to debug this. In all likelihood there is a 302 redirect after logging in. You can watch for that (among other conditions) using tools such as:

Keep in mind that what you're trying to do is not simple. I've gotten it to work with some sites, but not others and the reasons for one or the other can be quite elusive.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top