I am working with the API that for a number of different errors with a custom message (due phrase) Sends 406. It may look like this:
406 not acceptable: user is already logged in
406 not acceptable: unavailable password field
406 Not acceptable: Node does not exist.
I can get the 406 status code and standard "not acceptable" string by using:
NSHTTPURLResponse * HTTPResponse = (NSHTTPURLResponse *) response; NSInteger statusCode = [HTTPResponse statusCode]; [NSHTCPRRPRPAPRPS localized string forrestatus code: HTTPResponse.statusCode];
Although I really need a rational message how to handle the reaction. How can I get it using standard ISS SDK?
I really need a reason to know the phrase message how to control the reaction Go.
Then the API is broken. The reason is only debugging help, it is not about informing customer behavior. From
to:
The status-code is intended for use by automount and reason-phrase is intended for human users to check or display reason-phrase do not require.
If there is information about the reaction that can not be addressed by the single status code, then the appropriate place for this is the reason for the use of a phrase in the header or feedback body. There is no correct place to provide the necessary information.
Comments
Post a Comment