Merge pull request #2 from jtom38/features/rest-fix

sending now a patch request to update the IP
This commit is contained in:
James Tombleson 2022-08-19 18:08:28 -07:00 committed by GitHub
commit 3b017b5daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
}