var request = (HttpWebRequest) WebRequest.Create("xxx");
request.CookieContainer = new CookieContainer();
request.CookieContainer = cookieContainer;
request.Method = "PUT";
request.UserAgent =
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36";
request.ContentType = "application/json";
var postData = "json={\"area_code\":\"564\"}";
var byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
var dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
var response = (HttpWebResponse) request.GetResponse();
dataStream = response.GetResponseStream();
var reader = new StreamReader(dataStream);
var result = reader.ReadToEnd();
return result;