Hello Experts.
http://210.255.200.204:804/api/Station/SavePetrolStation
I Have this Above Link. Where I Have To Insert DATA Using Asp.net C#.
In Postman The Record Is Inserting Into DB Through WebApi Link.
But This Code Is In RestSharp.
I am In Need Of Simple C# Asp.net Code.
var client = new RestClient("http://210.255.200.204:804/api/Station/SavePetrolStation?UserId=108");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer Gj8D9aMh3IwGxYjRpImauhjOu_wmHaQ4I21_vIJ0eUHYWf0ASphbACuW84TrMaTMSZI8YjqTtkr4O9Ffl_q0ejPzVZ5sHKpQhiBfoZhOqi8klIo3wIPzZroJRasa0VQbIfcvo5JPecwRTlFYqI2zxn3ZsinhiqjLSgUqILabZ4wy2vGxKS_3pwteyKQokYzQUtBpsKpZe4RWhfhrcP6BMa0cJQqfpBHon1O0TZbSIh0V3nGCAttvUzWyXp39YuLwoh35lAofINpw94GOAMtHjg");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("StationName_Arabic", "Testing1");
request.AddParameter("StationName_English", "Testing1");
request.AddParameter("CompanyName", "Testing1");
request.AddParameter("StationNo", "5");
request.AddParameter("PriceCategId", "1");
request.AddParameter("Address", "Testing1");
request.AddParameter("VatNumber", "Testing1");
request.AddParameter("LandMark", "Testing1");
request.AddParameter("Active", "0");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);