I am using C# to try retrieve a token and my code is based on this example:https://docs.unity3d.com/ScriptReference/WWWForm-headers.html
IEnumerator Start() {
string urlToken = "myUrl";
WWWForm form = new WWWForm ();
form.AddField ("username", username);
form.AddField ("password", password);
Hashtable header = form.headers;//where I am getting my error*
header.Add("content-type", "application/json"); //header I need send over
WWW tokenRequest = new WWW (urlToken, form, header);
yield return tokenRequest;
print ("Anything back?" + tokenRequest.bytesDownloaded);
}
*Assets/WWWDemo.cs(46,19): error CS0029: Cannot implicitly convert type System.Collections.Generic.Dictionary to System.Collections.Hashtable
How would the header be assigned correctly? Does anyone have any ideas?