首页 > 其他 > 详细

使用短信通发短信

时间:2016-03-30 09:47:45      阅读:132      评论:0      收藏:0      [点我收藏+]

http://www.duanxin.cm/

    class Program
    {
        static string url = "http://180.97.163.89:8012/OpenPlatform/OpenApi";
        static void Main(string[] args)
        {
         
            var t = Task.Run(() => PostMessage());
            t.Wait();



        }

        public static async Task PostMessage()
        {
            var pairs = new List<KeyValuePair<string, string>>
                        {
                            new KeyValuePair<string, string>( "action", "sendOnce" ), 
                            new KeyValuePair<string, string>( "ac", "1001@" ), 
                            new KeyValuePair<string, string>( "authkey", "D5528AA2EEED774746754FF9CE36DA8D" ), 
                            new KeyValuePair<string, string>( "cgid", "6" ), 
                            new KeyValuePair<string, string> ( "c", "感谢您使用 爱考位 订单代报,您的订单号是:034421" ),
                            new KeyValuePair<string, string> ( "m", "13429329134" )
                        };
            var content = new FormUrlEncodedContent(pairs);
            using (var client = new HttpClient())
            {
                var response =
                    await client.PostAsync(url, content);
                string jsonMessage = await response.Content.ReadAsStringAsync();
            }

        }
    }

 

使用短信通发短信

原文:http://www.cnblogs.com/tgdjw/p/5335842.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!