• 后台post请求


    public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            System.Net.WebClient client = new System.Net.WebClient();
            client.Headers.Add("Accept_Language", "zh-cn");
            client.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
            var name = new System.Collections.Specialized.NameValueCollection();
            name.Add("action", "send");//固定
            name.Add("userid", "");//公司id
            name.Add("account", "******");//接口账号
            name.Add("password", "****");//接口密码
            name.Add("mobile", "***");//接收短信的手机
            name.Add("content", "12345【公司名称】");
            name.Add("sendTime", "");//发送时间
            name.Add("extno", "");//扩展码
            byte[] buffer = client.UploadValues("http://dx.ipyy.net/smsJson.aspx", "post", name);
            string str = System.Text.Encoding.UTF8.GetString(buffer);
            context.Response.Write(str);
        }
  • 相关阅读:
    2-1(续)
    2-1
    28-69. Sqrt(x)
    27-75. Sort Colors
    26-78. Subsets
    MySQL--->存储引擎及图形化工具
    MySQL--->高级对象
    MySQL--->常用函数
    MySQL--->多表查询
    MySQL--->高级查询
  • 原文地址:https://www.cnblogs.com/6654-cui/p/5565991.html
Copyright © 2020-2023  润新知