Ejemplo n.º 1
0
        public async Task <Flightplan> askserver(server servers, string s)
        {
            Httpclientclass httpRequestClass = new Httpclientclass();
            var             result           = await httpRequestClass.makeRequest(servers.ServerURL + s);

            Flightplan fl = new Flightplan();

            fl = JsonConvert.DeserializeObject <Flightplan>(result);
            return(fl);
        }
Ejemplo n.º 2
0
        public async Task <List <Flight> > askrequset(server servers, string relativeTime)
        {
            Httpclientclass http     = new Httpclientclass();
            string          url      = "/api/flights?relative_to=" + relativeTime;
            var             response = await http.makeRequest(servers.ServerURL + url);

            List <Flight> theflightsList = new List <Flight>();

            theflightsList = JsonConvert.DeserializeObject <List <Flight> >(response);
            return(theflightsList);
        }