[GH-ISSUE #88] 关于IOS15 icon支持的一些建议。 #63

Closed
opened 2026-03-03 11:55:47 +03:00 by kerem · 1 comment
Owner

Originally created by @MoshiCoCo on GitHub (Oct 1, 2021).
Original GitHub issue: https://github.com/Finb/bark-server/issues/88

我测试了下,目前是不支持在postbody中填写icon参数的。可否支持在postbody中填写icon参数?类似如下效果。

        Map<String, Object> requestsBody = new HashMap<>();
        requestsBody.put("device_key", "xxxxx");
        requestsBody.put("title", "测试");
        requestsBody.put("body", "测试内容");
        requestsBody.put("category", "category");
        requestsBody.put("icon", "https://image-pics.oss-cn-hangzhou.aliyuncs.com/1.jpg");

        String res = HttpRequest.post("https://bark.domain.top/push")
                .header(Header.CONTENT_TYPE, "application/json; charset=utf-8")
                .body(GsonUtils.toJson(requestsBody))
                .execute()
                .body();
Originally created by @MoshiCoCo on GitHub (Oct 1, 2021). Original GitHub issue: https://github.com/Finb/bark-server/issues/88 我测试了下,目前是不支持在postbody中填写icon参数的。可否支持在postbody中填写icon参数?类似如下效果。 ```java Map<String, Object> requestsBody = new HashMap<>(); requestsBody.put("device_key", "xxxxx"); requestsBody.put("title", "测试"); requestsBody.put("body", "测试内容"); requestsBody.put("category", "category"); requestsBody.put("icon", "https://image-pics.oss-cn-hangzhou.aliyuncs.com/1.jpg"); String res = HttpRequest.post("https://bark.domain.top/push") .header(Header.CONTENT_TYPE, "application/json; charset=utf-8") .body(GsonUtils.toJson(requestsBody)) .execute() .body(); ```
kerem closed this issue 2026-03-03 11:55:47 +03:00
Author
Owner

@Finb commented on GitHub (Oct 2, 2021):

V2版 api,需要将参数放在 ext_params 下

{
"ext_params" : {"icon": "..."}
}

普通 post 请求,则可以直接放到 postbody 里

<!-- gh-comment-id:932678554 --> @Finb commented on GitHub (Oct 2, 2021): V2版 api,需要将参数放在 ext_params 下 ``` { "ext_params" : {"icon": "..."} } ``` 普通 post 请求,则可以直接放到 postbody 里
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bark-server#63
No description provided.