public bool Test() { MyRequest reqCls = new MyRequest(); reqCls.MyCert = _cert; string strPost = string.Format("cookies=0&username={0}&password={1}", _userName, _password); string body = reqCls.GoRequest(_url, MyRequest.HttpEnum.POST, strPost,true,_referer); if (!string.IsNullOrEmpty(reqCls.LastError)) { return false; } return true; }
public bool Test() { MyRequest reqCls = new MyRequest(); //string strPost = string.Format("username={0}&password={1}", _userName, _password); string strPost =@"{""cookie"":0,""username"":""admin"",""password"":""12345678!""}"; string body = reqCls.GoRequest(_url, MyRequest.HttpEnum.POST, strPost,true,_referer); //string body = reqCls.GoRequest(_url, MyRequest.HttpEnum.GET, ""); if (!string.IsNullOrEmpty(reqCls.LastError)) { return false; } return true; }
public bool Test() { MyRequest reqCls = new MyRequest(); reqCls.MyCert = _cert; string strPost = string.Format("cookies=0&username={0}&password={1}", _userName, _password); string body = reqCls.GoRequest(_url, MyRequest.HttpEnum.POST, strPost, true, _referer); if (!string.IsNullOrEmpty(reqCls.LastError)) { return(false); } return(true); }
public bool Test() { MyRequest reqCls = new MyRequest(); //string strPost = string.Format("username={0}&password={1}", _userName, _password); string strPost = @"{""cookie"":0,""username"":""admin"",""password"":""12345678!""}"; string body = reqCls.GoRequest(_url, MyRequest.HttpEnum.POST, strPost, true, _referer); //string body = reqCls.GoRequest(_url, MyRequest.HttpEnum.GET, ""); if (!string.IsNullOrEmpty(reqCls.LastError)) { return(false); } return(true); }