日期:2014-05-17 浏览次数:20557 次
//以文件流POST方式发送
postData += ("&hashcode=" + GetMD5String(pwd));
//byte[] data = encoding.GetBytes(postData);
byte[] data = System.Text.Encoding.UTF8.GetBytes(postData);
// Prepare web request...
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://18dx.cn/API/Services.aspx");
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream = myRequest.GetRequestStream();
// 发送数据
newStream.Write(data, 0, data.Length);
newStream.Close();
//在后台以文件流POST方式发送
postData += ("&hashcode=" + GetMD5String(pwd));
//byte[] data = encoding.GetBytes(postData);
byte[] data = System.Text.Encoding.UTF8.GetBytes(postData);
// Prepare web request...
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://18dx.cn/API/Services.aspx");
myRequest.Method = "POST";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream = myRequest.GetRequestStream();
// 发送数据
newStream.Write(data, 0, data.Length);
newStream.Close();
<!DOCTYPE html>