From 1e3113c2c09ccc2c66e9289413aae7ea8810f3f1 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Fri, 19 Aug 2022 21:35:44 +0000 Subject: [PATCH] sending now a patch request to update the IP --- cloudflare.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudflare.go b/cloudflare.go index 018797a..c68d398 100644 --- a/cloudflare.go +++ b/cloudflare.go @@ -225,7 +225,7 @@ func (c *CloudFlareClient) UpdateDnsEntry(DomainId string, DnsDetails *DnsDetail return err } - req, err := http.NewRequest("GET", endpoint, bytes.NewBuffer(body)) + req, err := http.NewRequest("PATCH", endpoint, bytes.NewBuffer(body)) if err != nil { return err } @@ -243,6 +243,6 @@ func (c *CloudFlareClient) UpdateDnsEntry(DomainId string, DnsDetails *DnsDetail return errors.New("failed to update the IP address") } - //log.Print(resp) + log.Println("IP Address request was sent and no errors reported.") return nil }