Python语言
提示
python代码使用了requests依赖,如果使用青龙面板请先安装依赖
# 常规使用
#coding:utf-8
import requests
import json
# 通道码/口令码
channel_code = '4d2dac865118761a14d10d7d3afe7c35'
head = '测试标题'
body = '测试内容'
url = 'http://push.phprm.com/'
headers={
'Content-Type': 'application/json'
}
apiUrl='https://www.phprm.com/services/push/send/'+channel_code
data={'head':head,'body':body,'url':url}
res=requests.post(headers=headers,url=apiUrl,data=json.dumps(data).encode(encoding='utf-8'),timeout=10)
print(json.dumps(res))
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last Updated: 2024/12/12, 21:28:26