I'm having the issue that we can't get HTTP Response codes well from the Unity.WWW class. At the moment we are reading the following property for the statuscode after calling our REST API.
request.responseHeaders["STATUS"]
But some times this is empty. With a 401 response it is empty for example, the request does contain an error in this case, but the error is different on many devices. So you can't base anything on it.
Does someone know a way how to solve this?
NOTE: i can't use any plugins from the asset store as we need to distribute it. So i'm looking for a coding solution or another approach that will work with unity on Android and IOS.
Thanks in advance!
EDIT:
Hereby the errors returned on a 401 response, Example errors: "java.io.IOException: No authentication challenges found" or "java.io.IOException: Received authentication challenge is null"