[GH-ISSUE #172] GET请求Content-Type设置为application/json时报错 #154

Closed
opened 2026-03-03 11:37:33 +03:00 by kerem · 0 comments
Owner

Originally created by @shinciao on GitHub (Oct 28, 2022).
Original GitHub issue: https://github.com/Finb/Bark/issues/172

为某第三方系统接入 bark 推送时发现该系统会对 GET 请求添加 Content-Type: application/json 的请求头。
Bark收到请求后会返回 400 错误 request bind failed: json: unexpected end of JSON input
希望兼容这种有 Content-Type: application/json 的请求头,但无 body 的情况。

image

Originally created by @shinciao on GitHub (Oct 28, 2022). Original GitHub issue: https://github.com/Finb/Bark/issues/172 为某第三方系统接入 bark 推送时发现该系统会对 GET 请求添加 Content-Type: application/json 的请求头。 Bark收到请求后会返回 400 错误 request bind failed: json: unexpected end of JSON input 希望兼容这种有 Content-Type: application/json 的请求头,但无 body 的情况。 ![image](https://user-images.githubusercontent.com/21251711/198455101-8e1d4034-9fad-4ad0-80fc-8f1c367f0fca.png)
kerem closed this issue 2026-03-03 11:37:34 +03:00
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#154
No description provided.