PowerShell->ntfy:Windows电脑推送通知到安卓手机命令范例



单行格式范例:

Invoke-RestMethod -Method Post -Uri "https://ntfy.sh/[你的主题名称]" -ContentType "text/plain; charset=utf-8" -Headers @{ Title = "=?utf-8?B?6L+Z5piv5qCH6aKY?="; Priority = "5"; Tags = "loudspeaker" } -Body "这是正文。"

多行格式范例:

$Request = @{
  Method = "POST"
  URI = "https://ntfy.sh/[你的主题名称]"
  ContentType = "text/plain; charset=utf-8"
  Headers = @{
    Title = "=?utf-8?B?6L+Z5piv5qCH6aKY?="
    Priority = "5"
    Tags = "loudspeaker"    
  }
  Body = "这是正文。"
}
Invoke-RestMethod @Request

Tips:"这是标题"这4个字的UTF-8 Base64编码为6L+Z5piv5qCH6aKY。

相关链接

[1].ntfy官网:https://ntfy.sh/
[2].ntfyg下载:https://github.com/binwiederhier/ntfy-android/releases

上一篇: 钉钉「AI应用」无代码应用开发流程图解指南
下一篇: 这是最新一篇日志
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
最新日志:
评论: 0 | 引用: 0 | 查看次数: 35
发表评论
登录后再发表评论!