Skip to content

Commit

Permalink
Async methodlardaki result kaldırıldı
Browse files Browse the repository at this point in the history
  • Loading branch information
eyupbasefy committed Dec 9, 2024
1 parent df6377b commit c896462
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Iyzipay/RestHttpClientV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public async Task<T> PostAsync<T>(String url, Dictionary<string, string> headers
requestMessage.Headers.Add(header.Key, header.Value);
}

HttpResponseMessage httpResponseMessage = HttpClient.SendAsync(requestMessage).Result;
HttpResponseMessage httpResponseMessage = await HttpClient.SendAsync(requestMessage);
var readAsString = await httpResponseMessage.Content.ReadAsStringAsync();
var response = JsonConvert.DeserializeObject<T>(readAsString);
response.AppendWithHttpResponseHeaders(httpResponseMessage);
Expand Down Expand Up @@ -141,7 +141,7 @@ public async Task<T> PutAsync<T>(String url, Dictionary<string, string> headers,
requestMessage.Headers.Add(header.Key, header.Value);
}

HttpResponseMessage httpResponseMessage = HttpClient.SendAsync(requestMessage).Result;
HttpResponseMessage httpResponseMessage = await HttpClient.SendAsync(requestMessage);
var readAsString = await httpResponseMessage.Content.ReadAsStringAsync();
var response = JsonConvert.DeserializeObject<T>(readAsString);
response.AppendWithHttpResponseHeaders(httpResponseMessage);
Expand Down Expand Up @@ -221,7 +221,7 @@ public async Task<T> DeleteAsync<T>(String url, Dictionary<string, string> heade
requestMessage.Headers.Add(header.Key, header.Value);
}

HttpResponseMessage httpResponseMessage = HttpClient.SendAsync(requestMessage).Result;
HttpResponseMessage httpResponseMessage = await HttpClient .SendAsync(requestMessage);
var readAsString = await httpResponseMessage.Content.ReadAsStringAsync();
var response = JsonConvert.DeserializeObject<T>(readAsString);
response.AppendWithHttpResponseHeaders(httpResponseMessage);
Expand Down

0 comments on commit c896462

Please sign in to comment.