I don’t think any of the http classes in Unity provide such a fine grained error control. HTTP calls open a connection, retrieve data and close the connection. If something goes wrong the HTTP protocol replies with a an error code (such as the popular 404).
Keeping a connection state in your code makes little sense because the connection is shut down as soon as you get a reply from the other side. If you check the WWWForm doc example you’ll see it provides a way for catching HTTP errors.
And if you want something more sophisticated check the UnityWebRequest class
I already decided to check the first letter of the error, if there is no error the PHP file’s very first letter would be 0, else my client will throw an error. Thanks anyways. It’s too late to switch to UnityWebRequest… i already coded like 2k lines of code already …thanks for the nice answer anyways.