Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public interface INetworkService
{
Task<NetResult<TResult>> GetAsync<TResult>(string uri, string token = "");
Task<NetResult<TResult>> PostAsync<TResult>(string uri, TResult data, string token = "", string header = "");
Task<NetResult<TResult>> PostAsync<TResult>(string uri, string data, string clientId, string clientSecret);
Task<NetResult<TResult>> PutAsync<TResult>(string uri, TResult data, string token = "", string header = "");
Task<NetResult<bool>> PatchAsync(string uri, object data, string token = "", string header = "");
Task DeleteAsync(string uri, string token = "");
}
public class NetResult<T>
{
public int ErrorCode
{
get;
set;
}
public string ErrorMessage
{
get;
set;
}
public bool IsError
{
get;
set;
}
public T Data
{
get;
set;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.