UnityWebRequest POST to PHP not work

后端 未结 4 718
孤独总比滥情好
孤独总比滥情好 2020-12-11 22:19

I use documentation with WWWForm: https://docs.unity3d.com/Manual/UnityWebRequest-SendingForm.html

C#:

void Start() {
    StartCoroutine(Upload());
}         


        
4条回答
  •  悲&欢浪女
    2020-12-11 22:55

    I tried all of the above answers and nothing worked, but I noticedd that Unity adds a Request Header :

    upgrade-insecure-requests  1
    

    So I upgraded my url to https://

    It still didn't work with MultipartFormData, but it started working with WWWForm form = new WWWForm();

提交回复
热议问题