/// <summary>
/// 发送POST请求
/// </summary>
/// <param name="url">请求URL</param>
/// <param name="data">请求参数</param>
/// <returns></returns>
[HttpGet]
public string HttpPost(string url, string data)
{
HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
//字符串转换为字节码
byte[] bs = Encoding.UTF8.GetBytes(data);
//参数类型,这里是json类型
//还有别的类型如"application/x-www-form-urlencoded",
httpWebRequest.ContentType = "application/json";
//参数数据长度
httpWebRequest.ContentLength = bs.Length;
//设置请求类型
httpWebRequest.Method = "POST";
//设置超时时间
httpWebRequest.Timeout = 20000;
httpWebRequest.Headers.Add(HttpReque