using System.IO; using System.Threading; using System.Threading.Tasks; namespace System.Application.Services { public interface IHttpService { public static IHttpService Instance => DI.Get(); /// /// 通过 Get 请求 API 内容 /// /// /// /// /// /// Task GetAsync(string requestUri, string accept = MediaTypeNames.JSON, CancellationToken cancellationToken = default) where T : notnull; /// /// 通过 Get 请求 Image 内容 /// /// /// 渠道类型,根据不同的类型建立不同的缓存文件夹 /// /// Task GetImageAsync( string requestUri, string channelType, CancellationToken cancellationToken = default); } #if DEBUG [Obsolete("use IHttpService.Instance", true)] public class HttpServices { } #endif }