Ejemplo n.º 1
0
 //---------------------------------------------------------------------------------
 /// <summary>
 /// Make a GET rest call
 /// </summary>
 //---------------------------------------------------------------------------------
 T RestGet <T>(VstsApi api, Dictionary <string, string> query = null)
 => RestCall <T>((HttpClient client) => client.GetAsync(new Uri(GetApiUrl(api.ToString(), query))));
Ejemplo n.º 2
0
 //---------------------------------------------------------------------------------
 /// <summary>
 /// Make a POST rest call
 /// </summary>
 //---------------------------------------------------------------------------------
 T RestPost <T>(VstsApi api, HttpContent content, Dictionary <string, string> query = null)
 => RestCall <T>((HttpClient client) => client.PostAsync(new Uri(GetApiUrl(api.ToString(), query)), content));
Ejemplo n.º 3
0
 //---------------------------------------------------------------------------------
 /// <summary>
 /// Make a PATCH rest call
 /// </summary>
 //---------------------------------------------------------------------------------
 T RestPatch <T>(VstsApi api, string id, HttpContent content, Dictionary <string, string> query = null)
 => RestCall <T>((HttpClient client)
                 => client.PatchAsync(new Uri(GetApiUrl($"{api}/{id}", query)), content));