Add method to webhook.

This commit is contained in:
Yang Luo
2021-12-26 19:56:02 +08:00
parent 2ec947d488
commit 5015bf1c7d
4 changed files with 29 additions and 4 deletions

View File

@ -26,7 +26,7 @@ func sendWebhook(webhook *Webhook, record *Record) error {
body := strings.NewReader(util.StructToJson(record))
req, err := http.NewRequest("POST", webhook.Url, body)
req, err := http.NewRequest(webhook.Method, webhook.Url, body)
if err != nil {
return err
}