Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
add content type to webhook request
Browse files Browse the repository at this point in the history
Signed-off-by: Turfa51nodes <[email protected]>
  • Loading branch information
MajdT51 committed Aug 16, 2022
1 parent 5fa4db1 commit 056d615
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/webnotifier/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func notifyWH(destination string, message []byte) error {
return fmt.Errorf("failed to create new http post request for %s: %w", destination, err)
}

req.Header.Add("Content-Type", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
return fmt.Errorf("failed to post notification to %s: %w", destination, err)
Expand Down

0 comments on commit 056d615

Please sign in to comment.