21 lines
792 B
C#
21 lines
792 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Common.Request
|
|
{
|
|
public interface IRequestApi
|
|
{
|
|
Task<string> GetAsync(string host, string resource, Dictionary<string, object> param,
|
|
Dictionary<string, string> headerParms = null, int timeOut = 5);
|
|
|
|
Task<string> PostAsync(string host, string resource, object param, Dictionary<string, string> queryParam = null,
|
|
Dictionary<string, string> headerParms = null, int timeOut = 5);
|
|
|
|
Task<string> PostFormDataAsync(string host, string resource, Dictionary<string, object> param);
|
|
|
|
|
|
Task<bool> DownloadFile(string fileName, string host, string resource,
|
|
Dictionary<string, object> param = null, Dictionary<string, string> headers = null);
|
|
|
|
}
|
|
} |