public async Task <string> CreateOtpService(CreateOtpModel createOtpModel)
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                try
                {
                    var uri     = new Uri("https://arkho-app.org:6443/FitnessApp/manageservices/v1/members/startPasswordReset");
                    var json    = JsonConvert.SerializeObject(createOtpModel);
                    var content = new StringContent(json, Encoding.UTF8, "application/json");

                    HttpResponseMessage response = null;

                    response = await client.PostAsync(uri, content);

                    if (response.IsSuccessStatusCode)
                    {
                        var responseJson = response.Content.ReadAsStringAsync().Result;
                        var result       = JsonConvert.DeserializeObject <ResetResponseModel>(responseJson);
                        return(result.statusInfo.Status == "Sent" ? "Success" : "Failure");
                    }
                    else
                    {
                        return("Failure");
                    }
                }
                catch (Exception ex)
                {
                    return("Failure");
                }
            }
            else
            {
                return("Failure");
            }
        }
Exemple #2
0
 public Task <string> CreateOtpService(CreateOtpModel createOtpModel)
 {
     throw new NotImplementedException();
 }
Exemple #3
0
 public Task <String> CreateOtpService(CreateOtpModel createOtpModel)
 {
     return(restService.CreateOtpService(createOtpModel));
 }