var request = (HttpWebRequest)WebRequest.Create(apiURL);
request.Proxy = new WebProxy(MyProxyHostaddress , MyProxyPort);
request.Method = "POST";
request.ContentType = "application/json";
request.Accept = "application/json";
RequestClass obj = new RequestClass();
obj.reqdata= "some string";
obj.msgid = "0";
string json = JsonConvert.SerializeObject(obj);
var client = new HttpClient();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var response = await client.PostAsJsonAsync(apiURL, obj);