Ejemplo n.º 1
0
 public static async Task <T> PostAsync <T>(string ApiUrl, string JsonContent) where T : new()
 {
     return(await PostAsync <T>(ClientHelper.GetClient(), ApiUrl, JsonContent));
 }
Ejemplo n.º 2
0
 public static T Post <T>(string ApiUrl, string JsonContent) where T : new()
 {
     return(PostAsync <T>(ClientHelper.GetClient(), ApiUrl, JsonContent).Result);
 }
Ejemplo n.º 3
0
 public static async Task <T> GetByTokenAsync <T>(string ApiUrl, string Token) where T : new()
 {
     return(await GetAsync <T>(ClientHelper.GetClient(Token), ApiUrl));
 }
Ejemplo n.º 4
0
 public static async Task <T> GetByBasicAuthAsync <T>(string ApiUrl, string Username, string Password) where T : new()
 {
     return(await GetAsync <T>(ClientHelper.GetClient(Username, Password), ApiUrl));
 }
Ejemplo n.º 5
0
 public static async Task <T> PostByBasicAuthAsync <T>(string ApiUrl, string JsonContent, string Username, string Password) where T : new()
 {
     return(await PostAsync <T>(ClientHelper.GetClient(Username, Password), ApiUrl, JsonContent));
 }