mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-11-22 11:24:04 +01:00
Fix bug where GET or HEAD action requests could not be made from the web client
Closes #468
This commit is contained in:
parent
e874f66572
commit
93cacc3a53
1 changed files with 3 additions and 1 deletions
|
@ -399,7 +399,9 @@ const performHttpAction = async (notification, action) => {
|
|||
const response = await fetch(action.url, {
|
||||
method: action.method ?? "POST",
|
||||
headers: action.headers ?? {},
|
||||
body: action.body ?? ""
|
||||
// This must not null-coalesce to a non nullish value. Otherwise, the fetch API
|
||||
// will reject it for "having a body"
|
||||
body: action.body
|
||||
});
|
||||
console.log(`[Notifications] HTTP user action response`, response);
|
||||
const success = response.status >= 200 && response.status <= 299;
|
||||
|
|
Loading…
Reference in a new issue