UnityWebRequest Post submits empty/null $_POST

I’ve been going through the documentation for submitting a form via UnityWebRequest.Post, and seemingly no matter what method I use, the values always run in empty on the server.

Here is my IEnumerator that submits the web request

IEnumerator Upload()
    {
        WWWForm form = new WWWForm();
        form.AddField("action", "create-user");

        //url is filled in on my end, replacing with "--------" here
        UnityWebRequest www = UnityWebRequest.Post("--------", form);
        yield return www.SendWebRequest();

        if (www.isNetworkError || www.isHttpError)
        {
            Debug.Log(www.error);
        }
        else
        {
            Debug.Log(www.downloadHandler.text);
        }
    }

It’s basically just a carbon copy of every example of this I see, yet I cannot get _POST or any variable of it to return anything. I did a var_dump of _POST on the server and it returns an empty array. Is there a server setting or something of the sort that I’m missing?

I’ve also tried using the IMultipartFormData and it does the same thing.

It’s also worth noting I have used GET and it works just fine, but I need the data to be sent through POST.

I resolved the issue by using the IMultipartFormData method AND ensuring that the URL is set to https, two things I had tried previously but not together.

Hi,

I know im a bit late to this, and you seem to have solved your particular issue. I am curious what it is that you are working on? It seems to be a connected game of some kind - and if you are looking for an authorization/login, metric gathering, and analytics - Id like to chat about that. I am working on a system to provide just that; and would absolutely love some feedback around it. Maybe we can help each other?