예제 #1
0
        public async System.Threading.Tasks.Task <ResponseMessage> RegisterNewUser(UserLoginDataPayLoad data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = await _client.PostAsync(RegisterNewUserUrl, content);

            //
            var rep = response.Content.ReadAsStringAsync();
            //response.EnsureSuccessStatusCode();
            //string responseString = await response.Content.ReadAsStringAsync();
            ResponseMessage msg = JsonConvert.DeserializeObject <ResponseMessage>(rep.Result);

            //
            return(msg);
        }
예제 #2
0
        public async System.Threading.Tasks.Task <ResponseMessage> ChangeUserPasswordFromTokenControllerService(UserLoginDataPayLoad data)
        {
            var jsonString = JsonConvert.SerializeObject(data);
            var content    = new StringContent(jsonString, Encoding.UTF8, "application/json");
            var response   = await _client.PostAsync(ChangeUserPasswordFromTokenControllerUrl, content);

            //
            var             rep = response.Content.ReadAsStringAsync();
            ResponseMessage msg = JsonConvert.DeserializeObject <ResponseMessage>(rep.Result);

            //
            return(msg);
        }