Beispiel #1
0
 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);
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
 public async Task <AllData> GetAll()
 {
     return(await _http.GetJsonAsync <AllData>(_configuration["BaseAddress"] + Constants.ALL));
 }
Beispiel #7
0
 public static async Task <string> DownloadImageAsync(this System.Net.Http.HttpClient http, string name) =>
 await http.GetJsonAsync <string>("api/Car/Download/" + name);
Beispiel #8
0
 public static Task <T> GetJSONAsync <T>(this System.Net.Http.HttpClient client, string url)
 {
     return(client.GetJsonAsync <T>(requestUri: url));
 }