iphone - ASIHTTPRequest: check if username/password is correct -


how can check webservice if username/password correct?

i don't want transfer whole response body. want know if username/password exists , correct. i'm sending request webservice this:

self.request = [asihttprequest requestwithurl:urlobject]; [self.request setusername:username]; [self.request setpassword:password]; [self.request addrequestheader:@"accept" value:@"application/json"]; [self.request setdelegate:self]; [self.request startasynchronous]; 

if access webservice browser , insert wrong password, again authentication dialog displayed. tried same in xcode , status code = 200 if password wrong. thought can status codes 401 , on. didn't worked, because status code = 200. have change on serverside?

i'm using rest webservice, uses restlet 2.0 java framework. docs

i'm still not sure how webservice works, information given think can answer question.

if getting 'requestfailed:' when username , password wrong, should able avoid downloading response body using:

[request setrequestmethod:@"head"]; 

Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -