Exemple #1
0
 public static async Task <T[]> GetAndReadAsArrayFromJsonAsync <T>(this McmaHttpClient client,
                                                                   string url,
                                                                   IDictionary <string, string> queryParams = null,
                                                                   IDictionary <string, string> headers     = null)
 => await client.GetAsync(url, queryParams, headers).ReadAsArrayFromJsonAsync <T>();
Exemple #2
0
 public static async Task <T> GetAndReadAsObjectFromJsonAsync <T>(this McmaHttpClient client,
                                                                  string url,
                                                                  IDictionary <string, string> queryParams = null,
                                                                  IDictionary <string, string> headers     = null)
 =>
 await(await client.GetAsync(url, queryParams, headers).WithErrorHandling()).Content.ReadAsObjectFromJsonAsync <T>();