问题描述
我想为此创建HttpWebRequest POST方法 Url Check Gmail Exist or Not 并获取响应以检查是否存在电子邮件。
但这似乎是 Post方法的PostData字符串无效 。 HTML数据响应是意外结果。
有人可以帮我为POST方法编写合法的数据发布字符串吗?或者告诉我文档的名称,以学习为POST方法制作String PostData。
public static string CheckGmailLive(string Mail)
{
string result = "DIE";
Mail = Mail.Replace("@gmail.com","");
RequestHTTP requestHTTP = new RequestHTTP();
requestHTTP.SetSSL(SecurityProtocolType.Tls12);
requestHTTP.SetKeepAlive(true);
requestHTTP.SetDefaultHeaders(new string[] {
"content-type: application/json; charset=utf-8","user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/84.0.4147.135 Safari/537.36","X-Requested-With: XMLHttpRequest","Cookie: GAPS=1:EBclvdrR5urmEctKNLR-cxwe66Uv4Q:WBhJne3KQ2VpJY-f","Referrer: https://accounts.google.com/signin/v2/recoveryidentifier?hl=en&flowName=GlifWebSignIn&flowEntry=ServiceLogin"
});
string postData = "";
postData += "hl=en";
postData += "&continue=" + "https://accounts.google.com/ManageAccount?nc=1";
// postData += "&f.req=" + Mail;
postData += "&bgRequest=" + "!BQalBidCbWWDcRrP8VBYjGQ4OV6mo5cCAAAAOFIAAAAJmQN0skl5tVC-";
postData += "&at=AFoagUX2As0p3WTU2RI64dRHaFO7lyW7Kw:1598860321911";
postData += "&azt=AFoagUVBlawT09K0my3Z-OpmrgmiV1aLEg:1598860321911";
postData += "&gmscoreversion=undefined&checkConnection=&checkedDomains=youtube";
postData += "&email=" + Mail;
postData +="&pstMsg=1";
string text = requestHTTP.Request("POST","https://accounts.google.com/signin/v2/recoveryidentifier?hl=en&flowName=GlifWebSignIn&flowEntry=ServiceLogin",null,Encoding.UTF8.GetBytes(postData),true,60000);
Console.WriteLine(text); // I wanna get expected result to check Gmail Account Exist or Not
return null;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)