20 lines
566 B
C#
20 lines
566 B
C#
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Hua.DotNet.Code.Helper.Http;
|
|
|
|
public interface IHttpHelper
|
|
{
|
|
HttpClientHandler Handler { get; set; }
|
|
|
|
Dictionary<string, string> Headers { get; set; }
|
|
|
|
Task<TOut?> PostAsync<TIn, TOut>(string url, TIn input, int timeOut = 10,CancellationToken? cts = null) where TIn : class where TOut : class;
|
|
|
|
Task<TOut?> GetAsync<TOut>(string url, int timeOut = 10, CancellationToken? cts = null);
|
|
|
|
bool DownloadFile(string url, string fileFullName);
|
|
}
|