8,757
社区成员
发帖
与我相关
我的任务
分享
public HttpHelper(Uri requestUri, string method, params KeyValuePair<string, string>[] postValues)
{
this.Request = (HttpWebRequest)WebRequest.Create(requestUri);
this.Request.ContentType = "application/x-www-form-urlencoded";
this.Request.Method = method;
this.PostValues = new Dictionary<string, string>();
if (postValues != null && postValues.Length > 0)
{
foreach (var item in postValues)
{
this.PostValues.Add(item.Key, item.Value);
}
}
}