Ejemplo n.º 1
0
 public byte[] GetVerifyCodeImage(VerifyCodeReq req)
 {
     _VerifyCodeReq = req;
     _HttpClient.Reset();
     _HttpClient.Url  = GetTypeUrl.CombineParam(GetTypeParam());
     _ImageReq        = _HttpClient.GET().GetImageReq();
     _ImageReq.Cap_cd = req.Cap_cd;
     _ImageReq.UID    = req.UID;
     _HttpClient.Url  = GetSig.CombineParam(GetSigParam());
     _ImageReq.Vsig   = _HttpClient.GET().GetVsig();
     _ImageReq.Rand   = (new Random().NextDouble()).ToString();
     _HttpClient.Url  = GetImage.CombineParam(GetImageParam());
     return(_HttpClient.GET().GetBytes());
 }
Ejemplo n.º 2
0
        public void Shouldbe_GET_Request()
        {
            IHttpClient client = new DefaultHttpClient();

            client.GET();
            Assert.AreEqual(HttpVerb.GET, client.Verb);
        }
Ejemplo n.º 3
0
 public RegmasterRes Send(RegmasterReq req)
 {
     _RegmasterReq = req;
     _HttpClient.Reset();
     _HttpClient.Url = CheckRegmasterUrl.CombineParam(GetCheckRegmasterRequestParam());
     return(_HttpClient.GET().GetRemasterRes());
 }
Ejemplo n.º 4
0
        public void Shouldbe_URL_GET_Request()
        {
            var         url    = "http://test.com";
            IHttpClient client = new DefaultHttpClient();

            client.GET(url);
            Assert.AreEqual(HttpVerb.GET, client.Verb);
            Assert.AreEqual(url, client.Url);
        }