public static void CreateUserProfile(Userprofile userprofile)
        {
            var client = new RestClient("http://circlesapiserver.azurewebsites.net/api/");
            var request = new RestRequest("userprofiles/", Method.POST);
            request.AddJsonBody(userprofile);
            var response = new RestResponse();

            Task.Run(async () =>
            {
                response = await GetAsyncResponse.GetResponseContentAsync(client, request) as RestResponse;
            }).Wait();
        }
Example #2
0
        public static void EditUserprofile(int id, Userprofile userprofile)
        {
            var client  = new RestClient("http://circlesapitwoapp.azurewebsites.net/api/");
            var request = new RestRequest("userprofiles/" + id, Method.PUT);

            request.AddJsonBody(userprofile);
            var response = new RestResponse();

            Task.Run(async() =>
            {
                response = await GetAsyncResponse.GetResponseContentAsync(client, request) as RestResponse;
            }).Wait();
        }