Add headers to webhook.

This commit is contained in:
Yang Luo
2021-12-26 20:40:13 +08:00
parent 5015bf1c7d
commit 0c665edcbc
6 changed files with 170 additions and 8 deletions

View File

@ -33,6 +33,10 @@ func sendWebhook(webhook *Webhook, record *Record) error {
req.Header.Set("Content-Type", webhook.ContentType)
for _, header := range webhook.Headers {
req.Header.Set(header.Name, header.Value)
}
_, err = client.Do(req)
return err
}