I am using the following code to set the username and password to a form on a website:
ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url];
[request setRequestMethod:@"POST"];
[request setPostValue:[[NSUserDefaults standardUserDefaults] objectForKey:kUsername] forKey:@"username"];
[request setPostValue:[[NSUserDefaults standardUserDefaults] objectForKey:kPassword] forKey:@"password"];
[request setTimeOutSeconds:40];
[request setDelegate:self];
[request startAsynchronous];
However I am NSLogging the responseString from this request, and it is just printing out the source code of the website rather than any information.
This is likely a server-side issue or a logic error. In addition to responseString
, look at responseHeaders
and responseStatusCode
to make sure you're getting what you expect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With