查询发短信的账户余额

try
            {
                request = (HttpWebRequest)WebRequest.Create("http://221.130.185.108/smsmarketing/wwwroot/api/user_info/?uid=" + sUserID + "&pwd=" + sPW);
                //Post请求方式
                request.Method = "GET";
                //内容类型
                request.ContentType = "application/x-www-form-urlencoded";
                //获得响应流
                response = (HttpWebResponse)request.GetResponse();
                //从response 流中读取信息,以“GB2312”字符集
                StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("GB2312"));
                //返回流,即 response 返回信息
                return reader.ReadToEnd();
            }
            catch
            {
                throw new Exception("查询余额失败");
            }
posted @ 2009-06-25 14:47  小巩  阅读(252)  评论(0)    收藏  举报