Comments (4)
需要给参数URL编码,否则如果参数中包含 / 会破坏URL结构
例如
//给参数URL编码一下就行(各语言有不同的URL编码方法,方法名可能不一样)。
var url:String = "https://api.day.app/yourkey/" + "home/test".encodeURIComponent();
//最后URL长这样
printf(url); //https://api.day.app/yourkey/home%2ftest/
// 如果不编码则会产生歧义
// https://api.day.app/yourkey/home/test/
// 服务器会以为你请求的是 https://api.day.app/yourkey/{title}/{body}/
// 自然就会分两行显示了,一行粗体title ,一行常规字体body
from bark-server.
谢谢大佬解答,不过我是小白一个。
是不是要在哪加个参数?我用docker搭建的
from bark-server.
服务端是正常的,是因为你拼的请求URL本身有问题,你可以去查一些 URL编码 相关的文章看一看
或者
你不用把参数拼在URL路径里,用下面的格式去发推送
https://api.day.app/yourkey/?body={你要推送的内容}
from bark-server.
好的,谢谢大佬。我在去试试
from bark-server.
Related Issues (20)
- 请问releases中v2 v3 v4是有什么区别 HOT 2
- 希望能修改一个API的名字 HOT 2
- 可不可以搞个静默推送的配置 HOT 2
- 安装版本问题
- 你好,我这边基于Go版做了一个Java版的Bark Server HOT 2
- 旁路由模式下docker无法通过外网访问 HOT 1
- 使用数据库连接时提示如下错误,请问是我的参数吗 HOT 1
- 写了一个通过docker-comose.yml来自动搭建bark-server环境的工具及详细教程,希望能帮助到需要自己搭建bark-server的朋友
- [Feature Request] 支持端到端加密 HOT 5
- [Feature Request] Save All Notifications/Records on Server-Side
- iOS15越狱后执行没有任何输出 HOT 1
- 【MySQL】Docker容器如何连接MySQL HOT 1
- SIGQUIT: exit signal does not handle properly HOT 2
- APNS 真实设备 Token 如果泄露了,会有什么后果? HOT 1
- 【如何限制未知设备连接到服务器】 HOT 3
- windows部署
- 转义问题 HOT 2
- official freebsd release ? HOT 1
- failed device token from database HOT 3
- 如何更换p8证书 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bark-server.