using Nop.Core; namespace Nop.Services.Common; /// /// Represents the HTTP client to request current store /// public partial class StoreHttpClient { #region Fields protected readonly HttpClient _httpClient; #endregion #region Ctor public StoreHttpClient(HttpClient client, IWebHelper webHelper) { //configure client client.BaseAddress = new Uri(webHelper.GetStoreLocation()); _httpClient = client; } #endregion #region Methods /// /// Keep the current store site alive /// /// /// A task that represents the asynchronous operation /// The task result contains the asynchronous task whose result determines that request completed /// public virtual async Task KeepAliveAsync() { await _httpClient.GetStringAsync(NopCommonDefaults.KeepAlivePath); } #endregion }