//--------------------------------------------------------------------------------- /// <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))));
//--------------------------------------------------------------------------------- /// <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));
//--------------------------------------------------------------------------------- /// <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));