Hi Paul,
It makes more sense to me to follow the specs strictly, especially from
a web services point of view.
The spec says that the "Success" codes are
200,201,202,203,204,205,206,207 (WebDAV -
http://www.ietf.org/rfc/rfc2518.txt).
1xx are Informational (Meta) codes and 3xx Redirection codes and are
therefore NOT Success codes.
I have not come across a situation where I needed to use my own status
code, so I do not know if you are prohibited in doing so.
Though, this does sound like a useful feature.
Jon
Paul J. Lucas wrote:
Also, it seems that isSuccess() is wrong. In reading RFC 2616, 1xx
and 3xx codes are not errors, so they should be considered success
codes, no?
- Paul
On Jan 16, 2008, at 10:09 AM, Paul J. Lucas wrote:
What if I want to make up my own Status codes? The isSuccess() and
is*Error() methods do explicit code checks. Why? Why isn't the
implementation for, say, isSuccess() this:
return code >= 200 && code < 300;
?