Merge pull request #3110 from sbwalker/dev

change defaultvalue parameter to defaultResult to make more intuitive
This commit is contained in:
Shaun Walker
2023-08-05 16:35:04 -04:00
committed by GitHub

View File

@ -148,14 +148,14 @@ namespace Oqtane.Services
return default;
}
protected async Task<T> GetJsonAsync<T>(string uri, T defaultvalue)
protected async Task<T> GetJsonAsync<T>(string uri, T defaultResult)
{
var response = await GetHttpClient().GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None);
if (await CheckResponse(response, uri) && ValidateJsonContent(response.Content))
{
return await response.Content.ReadFromJsonAsync<T>();
}
return defaultvalue;
return defaultResult;
}
protected async Task PutAsync(string uri)