Skip to content

Commit

Permalink
fix: http method is fixed for send async method
Browse files Browse the repository at this point in the history
  • Loading branch information
alperensert committed Apr 9, 2024
1 parent e912fef commit d47731f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CloudflareDnsync.Services/CloudflareService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Task<CloudflareResponse<DnsRecord>> UpdateDnsRecordAsync(
DnsRecordUpdateRequest request,
CancellationToken cancellationToken = default)
=> SendAsync<CloudflareResponse<DnsRecord>>(
HttpMethod.Put,
HttpMethod.Patch,
$"zones/{zoneId}/dns_records/{recordId}",
request,
ignoreNullValues: true,
Expand All @@ -96,7 +96,7 @@ private async Task<TResult> SendAsync<TResult>(
bool? ignoreNullValues = null,
CancellationToken cancellationToken = default)
{
var request = new HttpRequestMessage(HttpMethod.Get, url);
var request = new HttpRequestMessage(method, url);
if (data is not null && (method == HttpMethod.Patch || method == HttpMethod.Post || method == HttpMethod.Put))
{
string? json;
Expand Down

0 comments on commit d47731f

Please sign in to comment.