Skip to content

Commit af85976

Browse files
committed
Set Content-Type on remote notification requests
The webhook POST sends a JSON body built with serde_json, but never declares it. reqwest's `body()` only sets the payload, so the request goes out without a Content-Type header and receivers that dispatch on it have to guess. The wiki documents the payload as JSON, and the recommended receivers (IFTTT, Svix, SIGNL4) branch on the content type.
1 parent 96b0b49 commit af85976

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/notifications/notify_and_log.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ fn send_remote_notification(
234234
let Ok(response) = client
235235
.post(remote_notifications.url())
236236
.header("User-agent", format!("{SNIFFNET_LOWERCASE}-{APP_VERSION}"))
237+
.header("Content-Type", "application/json")
237238
.body(notification.to_json())
238239
.send()
239240
.await

0 commit comments

Comments
 (0)