public static async Task <IList <CarBrand> > GetBrands(this System.Net.Http.HttpClient http) { if (Brands == null) { Brands = await http.GetJsonAsync <IList <CarBrand> >("api/Car/Brands"); } return(Brands); }
public Task <List <WFTask> > GetWFTasks(string username) { System.Net.Http.HttpClient httpClient = new System.Net.Http.HttpClient(); var rettasks = httpClient.GetJsonAsync <List <WFTask> >("http://localhost:32768/engine-rest/task?assignee=demo"); return(rettasks); }
public Task <List <Project> > GetBuildeProjectsAsync(int id, string username) { System.Net.Http.HttpClient httpClient = new System.Net.Http.HttpClient(); var projects = httpClient.GetJsonAsync <List <Project> >($"https://localhost:44324/api/Projects/Builder/{id}"); return(projects); }
public Task <Builder> GetBuilderAsync(int id, string username) { System.Net.Http.HttpClient httpClient = new System.Net.Http.HttpClient(); var builder = httpClient.GetJsonAsync <Builder>($"https://localhost:44324/api/Builders/{id}"); return(builder); }
public Task <List <Builder> > GetBuildersAsync(string username) { var builders = new List <Builder>(); System.Net.Http.HttpClient httpClient = new System.Net.Http.HttpClient(); var retbuilders = httpClient.GetJsonAsync <List <Builder> >("https://localhost:44324/api/Builders"); return(retbuilders); }
public async Task <AllData> GetAll() { return(await _http.GetJsonAsync <AllData>(_configuration["BaseAddress"] + Constants.ALL)); }
public static async Task <string> DownloadImageAsync(this System.Net.Http.HttpClient http, string name) => await http.GetJsonAsync <string>("api/Car/Download/" + name);
public static Task <T> GetJSONAsync <T>(this System.Net.Http.HttpClient client, string url) { return(client.GetJsonAsync <T>(requestUri: url)); }