Beispiel #1
0
        async Task AddDetailsToUserAsync(DetailsNewDTO detailsNew)
        {
            var content = new StringContent(JsonConvert.SerializeObject(detailsNew), Encoding.UTF8, "application/json");
            var tmp     = await content.ReadAsStringAsync();

            Console.WriteLine(tmp);
            var response = await client.PutAsync("users/details/", content);

            Console.WriteLine(response.StatusCode);
        }
Beispiel #2
0
        public void AddDetailsToUser()
        {
            DetailsNewDTO detailsNew = new DetailsNewDTO();

            detailsNew.fieldOfStudy = "Informatics";
            detailsNew.firstName    = "Alex";
            detailsNew.lastName     = "Porebski";
            detailsNew.university   = "Politechnika Slaska";
            detailsNew.yearOfStudy  = 3;
            AddDetailsToUserAsync(detailsNew).GetAwaiter();
        }