Overview
getJobActions API call returns different values for the Reason Code. In the case of success, while returning the result, it sometimes returns "OK" and sometimes returns blank.
HTTP Status Code: 200
HTTP Reason Phrase: OK
HTTP Status Code: 200
HTTP Reason Phrase:
This causes your consumer application to fail to process the data sent.
Solution
It is very important to note that HTTP Reason-Phrase is an optional parameter and is supposed to describe the reason for the HTTP Status Code. This is primarily useful in case of error conditions.
Also, W3.org says, while describing the HTTP Status Code and HTTP Reason Phrase:
The Reason-Phrase is intended to give a short textual description of the Status-Code.
The Status-Code is intended for use by automata and the Reason-Phrase is intended for
the human user.
So, it is not advisable to use HTTP Reason-Phrase in programs for condition checking. All programs consuming the web services data should use HTTP Status Code and the Response Structure, for processing and decision making.
Comments
0 comments
Please sign in to leave a comment.