Пример #1
0
        public void GetTest()
        {
            string url  = "https://www.baidu.com/s?ie=UTF-8&wd=c%23";
            string html = RestSharpManager.Get(url);

            Assert.True(html != null);
        }
Пример #2
0
        public void GetTest2()
        {
            // 等同于 https://www.baidu.com/s?ie=UTF-8&wd=c%23
            string url  = "https://www.baidu.com/s";
            string html = RestSharpManager.Get(url, null, null, null, new Dictionary <string, object> {
                { "ie", "UTF-8" }, { "wd", "c#" }
            });

            Assert.True(html != null);
        }