Пример #1
0
        public static CookieCollection GetCookie(string url, HttpPara para)
        {
            HttpWebRequest request = HttpWebUtility.Create(url, para, "HEAD", null);

            return(HttpWebUtility.ReceiveCookie(request));
        }
Пример #2
0
        public static void GetFile(string url, HttpPara para, string savePath)
        {
            HttpWebRequest request = HttpWebUtility.Create(url, para, "GET", null);

            HttpWebUtility.ReceiveFile(request, savePath);
        }
Пример #3
0
        public static string Operate(string url, HttpPara para, string method)
        {
            HttpWebRequest request = HttpWebUtility.Create(url, para, method, null);

            return(HttpWebUtility.ReceiveString(request));
        }
Пример #4
0
        public static string GetText(string url, HttpPara para)
        {
            HttpWebRequest request = HttpWebUtility.Create(url, para, "GET", null);

            return(HttpWebUtility.ReceiveString(request));
        }