How to call async Task Framework 3.5 please help me. I am calling this method in my 3.5 framework project its shows an error.any alternet way post json data using Framework 3.5 Here's my code:
public async void APIPushStatusDriverPostion(string direction,string carColor,string supplier_company,string SupplierAccountId,string Karho_Ref,string booking_id,string vehicale_type, string vehicle_id, string vehicle_plate, double latitude, double longitude, string carModel, string status, string driver_id, string driver_phone, string driver_first_name, string driver_last_name)
{
APIKarhoBookingProperties objbooking = new APIKarhoBookingProperties();
objbooking.vehicle.vehicle_type = vehicale_type;
objbooking.vehicle.vehicle_id = vehicle_id;
objbooking.vehicle.vehicle_plate = vehicle_plate;
objbooking.vehicle.latitude = latitude;
objbooking.vehicle.longitude = longitude;
objbooking.vehicle.eta_minutes = "null";
objbooking.vehicle.make = "null";
objbooking.vehicle.model = carModel;
objbooking.vehicle.color = carColor;
objbooking.vehicle.status = status;
objbooking.vehicle.driver_id = driver_id;
objbooking.vehicle.driver_phone = driver_phone;
objbooking.vehicle.driver_phone = driver_first_name;
objbooking.vehicle.driver_last_name = driver_last_name;
var json = JsonConvert.SerializeObject(objbooking);
using (var response = await httpClient.PostAsync("{supplier_id}/availability?version=2", json))
{
string responseData = await response.Content.ReadAsStringAsync();
}
}