-
-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Support guidelines
- I've read the support guidelines
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
The docs mention that the webhook method can be configured: https://crazymax.dev/diun/notif/webhook/
I tried GET, POST and PUT (which I need) but the request method is always POST.
Expected behaviour
The request should use the configured method.
Actual behaviour
The request is always a POST request.
Steps to reproduce
Setup a webhook to an endpoint which shows the called method.
Diun version
4.31.0
Docker info
Client: Docker Engine - Community
Version: 29.2.1
Docker Compose config
DIUN_NOTIF_WEBHOOK_METHOD=GETLogs
"webhook": {
"endpoint": "x",
"method": "GET",
"headers": {
"authorization": "Bearer x",
"content": ""
},
"timeout": 10000000000
}
Additional info
A quick search in the code showed this line, where POST seems to be hardcoded:
diun/internal/notif/webhook/client.go
Line 66 in 0c1e25e
| req, err := http.NewRequestWithContext(timeoutCtx, "POST", c.cfg.Endpoint, bytes.NewBuffer(body)) |
Reactions are currently unavailable