Quantcast
Channel: Questions in topic: "webrequest"
Viewing all articles
Browse latest Browse all 387

Pass Headers and Arguments in UnityWebRequest POST Method Object

$
0
0
How to pass header data and arguments to custom server using web services created?? I knew about web service call using POST method but how to add both arguments and headers in web service call that I can't able to solve. Up to now I have following code: IEnumerator LoadLoginInfromation () { WWWForm form = new WWWForm (); form.AddField ("username", "admin"); form.AddField ("password", "Admin123#"); UnityWebRequest www = UnityWebRequest.Post (GameConstants.CONTESTANT_LIST_BASE_URL, form); yield return www.Send(); if (www.isError) { Debug.Log (www.error); } else { Debug.Log ("Data: " + www.downloadHandler.text); } } Please give some help in this.

Viewing all articles
Browse latest Browse all 387

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>