コード例 #1
0
ファイル: Client.cs プロジェクト: anh120991/usexpress
 public static async Task <T> PostAsync <T>(string ApiUrl, string JsonContent) where T : new()
 {
     return(await PostAsync <T>(ClientHelper.GetClient(), ApiUrl, JsonContent));
 }
コード例 #2
0
ファイル: Client.cs プロジェクト: anh120991/usexpress
 public static T Post <T>(string ApiUrl, string JsonContent) where T : new()
 {
     return(PostAsync <T>(ClientHelper.GetClient(), ApiUrl, JsonContent).Result);
 }
コード例 #3
0
ファイル: Client.cs プロジェクト: anh120991/usexpress
 public static async Task <T> GetByTokenAsync <T>(string ApiUrl, string Token) where T : new()
 {
     return(await GetAsync <T>(ClientHelper.GetClient(Token), ApiUrl));
 }
コード例 #4
0
ファイル: Client.cs プロジェクト: anh120991/usexpress
 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));
 }
コード例 #5
0
ファイル: Client.cs プロジェクト: anh120991/usexpress
 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));
 }