短信发送

浪淘沙2年前后端291
@page
@model xxtsoft.Web.Entry.Pages.Index1Model
@{
}
<form method="post">
    <button type="submit" asp-page-handler="down" class="btn btn-primary">短信发送</button>
   
</form>
using AngleSharp.Io;

using Furion.RemoteRequest.Extensions;

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

using System.Text;

using xxtsoft.Common;

namespace xxtsoft.Web.Entry.Pages
{
    [Authorize]
    public class Index1Model : PageModel
    {
        public void OnGet()
        {
        }
        public async Task<IActionResult> OnPostDown()
        {
            

            string url = "https://smssh1.253.com/msg/v1/send/json";

            var response = await url.SetBody(new Dictionary<string, object> { { "account", "N44" }, { "password", "547b" }, { "msg", "123456" }, { "phone", "180764" } }, "application/json", Encoding.UTF8).PostAsStringAsync();


            return Content(response);

        }
    }
}


返回列表

上一篇:文件上传

下一篇:ckeditor编辑器

相关文章

asp.net core ZipDeploy iis发布 忽略某一件文件夹被删除

  services.AddZipDeploy(o => o.IgnorePathStarting("wwwroot/")); //iis发布...

asp.net core vue element plus select 下拉绑定

一、后端public List<dynamic> yxm { get; set; } = new();//就...

DBeaver连接oracle 下载驱动报错

https://blog.csdn.net/weixin_45764765/article/details/124327194...

visual studio 配置 asp.net core razor .shtml文件类型和包含,支持跨平台通用

自己在 ASP.NET Core 里写 Middleware 解析 SSI自己在 ASP.NET Core 里写 Middleware 解析 ...

asp.net core url编码

 HttpUtility.UrlEncode("https://fdy.eduw.cn/zf/index")...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。