iphone - HTTP POST request - sending username and password to the server -
i'm newcomer iphone world. i'm working on application having login page. have send uitext
value of username , password server. code appreciated.
you can check user_ name , password severer asihttprequest framework it's ex. of code twitter request.m file
if ([challenge previousfailurecount] == 0) { nsurlcredential *newcredential; newcredential=[nsurlcredential credentialwithuser:[self username] password:[self password] persistence:nsurlcredentialpersistencenone]; [[challenge sender] usecredential:newcredential forauthenticationchallenge:challenge]; [newcredential release]; } else { [[challenge sender] cancelauthenticationchallenge:challenge]; // inform user user name , password // in preferences incorrect nslog(@"invalid username or password"); }
Comments
Post a Comment