private void MainForm_Load(object sender, EventArgs e) { asf.controllInitializeSize(this); httpReqProc.Url = "https://kyfw.12306.cn/otn/leftTicket/init"; httpReqProc.Data = ""; httpReqProc.Referer = "https://kyfw.12306.cn/otn/index/initMy12306"; httpReqProc.CookieContainer = this.cookieContainer; httpReqProc.Host = "kyfw.12306.cn"; httpReqProc.doGet(); Console.WriteLine(httpReqProc.Response); }
public void beforeLogin() { string url = "https://kyfw.12306.cn/otn/login/init"; httpReqProc.Url = url; httpReqProc.Host = "kyfw.12306.cn"; httpReqProc.Accept = "text/html, application/xhtml+xml, */*"; httpReqProc.Data = ""; httpReqProc.doGet(); setCaptchaInPicBox(); }