コード例 #1
0
    IEnumerator getToken()
    {
        Dictionary <string, string> headers = new Dictionary <string, string> ();

        headers.Add("Content-Type", "application/json");
        headers.Add("Cookie", "Interceramic");
        headers.Add("Authorization", "Basic SU5NRVJTWVM6SU5NRVJTWVNQUzFOVEVSMTIzIw==");
        headers.Add("pClaveApp", claveApp);

        WWW www = new WWW("https://swsp.interceramic.com/ords/mastercontactossecws_sa/genera/token", null, headers);

        yield return(www);

        token = JsonUtility.FromJson <LogIn.TokenClass> (www.text);
        print("Token recupera: " + token.Token);
        StartCoroutine(recuperar());
    }
コード例 #2
0
    private IEnumerator corout_SendToken()
    {
        MainCanvas.showPopUpNoAnim(2);
        MainCanvas.popUps [2].GetComponent <LoadingManager> ().startSpinning();

        Dictionary <string, string> headers = new Dictionary <string, string> ();

        headers.Add("Content-Type", "application/json");
        headers.Add("Cookie", "Interceramic");
        headers.Add("Authorization", "Basic U09LT0xBQlM6U09LT0xBQlNQUjBEMTIzIw==");
        headers.Add("pClaveApp", claveApp);

        WWW www = new WWW(TokenURL, null, headers);

        yield return(www);

        token = JsonUtility.FromJson <LogIn.TokenClass> (www.text);
        StartCoroutine(corout_SendEncuesta());
    }