UnityWebRequest error 0 in Editor, but not in WebGL build

I’m trying to send a UnityWebRequest to a server.
It works perfectly on the WebGL Player, but not in the Editor

private static IEnumerator SendWebRequest(UnityWebRequest webRequest, UnityAction doneAction)
        using (webRequest)
            yield return webRequest.Send();    
            if (webRequest.isError)
                throw new Exception("Could not connect to backend: " + webRequest.responseCode);

In Editor, I simply dont receive anything from the server. The responseCode is 0.

CORS has been set up accourdingly to the Unity Manual.

I can get a response to other servers, e.g. www.google.com, it’s just my server that is not working. Is there something else that needs to be configured in order for it to work?

Did you find any solution to this? @ jeanfilho

I am having the same problem :frowning:

Hey guys! My problem was that the server did not have a valid certificate and unity was just discarding the entire packet. In the built version it worked with some warnings. IMO this should be improved to give a proper error message stating that the certificate is invalid, just like in the build.