Exemplo n.º 1
0
        public string HttpRequest(IDictionary <string, string> dicParams, string responseEncoding = "UTF-8")
        {
            var           responseStr = "";
            HttpWebHelper http        = new HttpWebHelper();

            if (RequestMethod.ToUpper() == "GET")
            {
                var _payUrl = HttpWebHelper.CreateParameter(dicParams);
                responseStr = http.Get(_payUrl, Encoding.GetEncoding(responseEncoding));
            }
            else
            {
                responseStr = http.Post(PayUrl, dicParams, Encoding.GetEncoding(responseEncoding), Encoding.GetEncoding(responseEncoding));
            }
            return(responseStr);
        }