Hi!
I used below code, but didn't get result. Because I need use token too here. How I can add token in below code and get result?
List<string> applicationList = new List<string>();
foreach (DataRow dr in dt.Rows)
{
applicationList.Add(dr[0].ToString());
applicationList.Add(dr[1].ToString());
applicationList.Add(dr[2].ToString());
applicationList.Add(dr[3].ToString());
applicationList.Add(dr[4].ToString());
applicationList.Add(dr[5].ToString());
applicationList.Add(dr[6].ToString());
}
var client = new RestClient($"https://192.168.1.121:2220/api/Test/InsertUser/?{applicationList}");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
var json = JsonConvert.SerializeObject(applicationList);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", json, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
My token = "01Kgm89j2d2rxfp123025CBNL6vHAT845";