private void button1_Click(object sender, EventArgs e)
{
//show the progressbar
progress form1 = new progress();
form1.Show();
//create the json file
Dictionary<string, string> information = new Dictionary<string, string>();
information.Add("input_path", resultjson.input);
information.Add("output_path", resultjson.output);
information.Add("gender", "Female");
information.Add("body_part", resultjson.OAR);
string body = JsonConvert.SerializeObject(information);
//restsharp to connect server
var client = new RestClient("http://10.120.252.74:5000/task_share_folder");
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader("Accept", "application/json");
request.Parameters.Clear();
request.AddParameter("application/json", body, ParameterType.RequestBody);
var response = client.Execute(request);
var content = response.Content; // raw content as string
MessageBox.Show(content);
}