短信发送

浪淘沙1年前后端125
@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编辑器

相关文章

C#JNTemplate模板引擎,标签指定${set(pagetotal=20)},后端如何获取pagetotal的值

using JinianNet.JNTemplate; class Program {     static void&...

asp.net core SqlSugar对SugarParameter 参数的调试

string sql = "select id,xm from stu where phone=@phone&...

asp.net core return Content 返回可解析的html

return Content(     "<!DOCTYPE html><html><body&g...

SqlSugar

   var dt = _db.SqlQueryable<object>("select * fr...

asp.net core弹出对话框最佳实践

 public void OnGet()  {         ...

发表评论    

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