Skip to content

Commit 35c259e

Browse files
authored
pdns: fix notify (#1983)
1 parent 3cefc7a commit 35c259e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

providers/dns/pdns/internal/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ func newJSONRequest(ctx context.Context, method string, endpoint *url.URL, paylo
218218

219219
req.Header.Set("Accept", "application/json")
220220

221-
if payload != nil {
221+
// PowerDNS doesn't follow HTTP convention about the "Content-Type" header.
222+
if method != http.MethodGet && method != http.MethodDelete {
222223
req.Header.Set("Content-Type", "application/json")
223224
}
224225

0 commit comments

Comments
 (0)