Ejemplo n.º 1
0
 public async Task <IRestResponse <ErrorResponse> > UnsuccessfulRegistration(string email, string password)
 {
     if (!string.IsNullOrEmpty(email) && string.IsNullOrEmpty(password))
     {
         BadRegisterRequest req = new BadRegisterRequest();
         req.email             = email;
         request.RequestFormat = DataFormat.Json;
         request.AddJsonBody(req);
     }
     return(await _client.ExecutePostAsync <ErrorResponse>(request));
 }
Ejemplo n.º 2
0
        public int getRegisterationStatusCode(string email, string password)
        {
            if (email != null && password != null)
            {
                RegisterRequest req = new RegisterRequest();
                req.email             = email;
                req.password          = password;
                request.RequestFormat = DataFormat.Json;
                restResponse          = _client.Execute(request);
            }
            else if (email != null && password == null)
            {
                BadRegisterRequest req = new BadRegisterRequest();
                req.email             = email;
                request.RequestFormat = DataFormat.Json;
                restResponse          = _client.Execute(request);
            }

            //Extract status code from received response and store as an Interger
            return((int)restResponse.StatusCode);
        }