Beispiel #1
0
    public void RequestSms()
    {
        if (this.smsCoroutine == null)
        {
            var smsModel = new SmsRequest()
            {
                SmsCode   = smsCodeInput.text,
                SessionId = Toolbox.Instance.sessionId
            };

            var req = new PostRequestUtil <SmsResponse>("https://vera-web-api.azurewebsites.net/api/Auth/smscode",
                                                        JsonUtility.ToJson(smsModel),
                                                        this.OnGetSmsFinished);

            this.authCoroutine = StartCoroutine(req.PostRequest());
        }
    }
Beispiel #2
0
    public void RequestAuth()
    {
        if (this.authCoroutine == null)
        {
            var authModel = new AuthRequest()
            {
                FirstName  = nameInput.text,
                MiddleName = surnameInput.text,
                LastName   = patronymicInput.text,
                Phone      = phoneInput.text,
            };

            var req = new PostRequestUtil <AuthResponse>("https://vera-web-api.azurewebsites.net/api/Auth", JsonUtility.ToJson(authModel), this.OnAuthFinished);

            this.authCoroutine = StartCoroutine(req.PostRequest());
        }
    }