I am developing a iOS app like eBay. For this web service developer is using Magento. He developed the web service for Login. Following are the situations :
1) If I send valid login credentials , he returns me logged in used info in response + a flag as result = true & in this case http status code is 200.
2) If I send wrong password , he returns me a flag as result = false & http status code is 200.
Basically I don't want to depend on result flag because , if developer changed the result flag name then iOS app can't recognize that. So I want to follow standards which is a http status codes.
My question is , in 2nd situation is it right to send 200 as http status code ? I think he should send me 401 ? Correct me if I am wrong. If I am right , is there any way to send http status code from php code so that I can check the http status code on iOS side ?