change defaultvalue parameter to defaultResult to make more intuitive

This commit is contained in:
sbwalker 2023-08-05 16:34:41 -04:00
parent 19e3cef7dd
commit 4bdcb974bd

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)