Ejemplo n.º 1
0
        public async Task <LoginResult> login(String username, String pass)
        {
            var client = new FlurlClient(LOGIN_URL).WithHeaders(headers);
            LoginResultInternal result;

            try
            {
                result = await client.PostUrlEncodedAsync(new
                {
                    login    = username,
                    password = pass
                }).ReceiveJson <LoginResultInternal>();
            }
            catch (Exception)
            {
                result = new LoginResultInternal();
            }
            return(new LoginResult(result));
        }
Ejemplo n.º 2
0
 public LoginResult(LoginResultInternal result)
 {
     this.result = result;
 }