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.