Note that there are some explanatory texts on larger screens.

plurals
  1. POGet the password from the webservices url and access through that password
    text
    copied!<p>I have one Webservices URL which appends with accesscode. I need to post accesscode to a webservices url and get json response. I am getting json response with correct accesscode and with incorrect accesscode too. I am not getting where the issue arising. I need to display alert when wrong password enters, here is my code..</p> <pre><code> NSString *post =[[NSString alloc] initWithFormat:@"txtsecurecode=%@",[txtsecurecode text]]; NSLog(@"PostData: %@",post); NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d",[postData length]]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://my example.com/Accountservice/Security/ValidateAccess?accesscode=abcdtype=1"]]]; NSURL *url; // I need to parse it into url here . [request setHTTPMethod:@"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSURLConnection *conn= [[NSURLConnection alloc] initWithRequest:request delegate:self]; if(conn) { NSLog(@"Connection Successful"); } else { NSLog(@"Connection could not be made"); } NSString *responseData = [[NSString alloc]initWithData:[NSData dataWithContentsOfURL:url] encoding:NSUTF8StringEncoding]; </code></pre> <p>IF I give wrong password, I am getting login failed, thats fine. when I correct password, It doesn't showing the content of that url. we need to parse the request into url. Can you help me how to solve the issue...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload