|
楼主 |
发表于 2013-8-4 11:14:54
|
显示全部楼层
HttpItem hi = new HttpItem();
hi.URL = PublicSource.URL + PublicSource.TempURL + "/index.save.html";
hi.Method = "POST";
hi.Postdata = postData;
hi.ContentType = "application/x-www-form-urlencoded";
hi.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36";
string res = hh.GetHtml(hi).Html;
Console.WriteLine(res);
if (res == null) { Console.WriteLine("超时,重新请求"); return PostSend(postData); }
if (res.Contains("parent.renderLeft") || res.Contains("成功"))
{
return true;
}
else if (res.Contains("重復"))
{
return true;
}
else
{
LogManager.WriteLog(LogFile.Trace, postData);
LogManager.WriteLog(LogFile.Trace, "返回:" + res);
return false;
}
这是post 数据代码 |
|