Hi , i use this code to login webservice i want to save cookies and login to webservies without user name and password but , i dont know how to save cookies after login !
can any body help me ?
thanks
void Start()
{
string urlAdress = URL;
WWWForm form1 = new WWWForm();
form1.AddField("username", "username");
form1.AddField("password", "password");
Hashtable header = new Hashtable();
header = form1.headers;
WWW www = new WWW(urlAdress, form1.data, header);
StartCoroutine(WaitForRequest(www));
}
IEnumerator WaitForRequest(WWW www)
{
yield return www;
// check for errors
if (www.error == null)
{
Debug.Log("WWW Ok!: " + www.data);
}
else
{
Debug.Log("WWW Error: " + www.error);
}
}
↧