mirror of
https://github.com/idanoo/go-mastodon-matrix-webhooks
synced 2025-07-01 11:02:14 +00:00
Logs
This commit is contained in:
parent
35d2e29f5f
commit
fc1a9882f9
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -108,12 +108,13 @@ func sendWebhook(msgText string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("Sending %s to %s", b, MATRIX_WEBHOOK_URL+"/"+MATRIX_CHANNEL)
|
||||
req, err := http.NewRequest("POST", MATRIX_WEBHOOK_URL+"/"+MATRIX_CHANNEL, bytes.NewBuffer(b))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
req.Header.Set("X-Custom-Header", "myvalue")
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
|
||||
client := &http.Client{}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue