Exemplo n.º 1
0
        public async Task <List <OfferDTO> > GetAllOffers()
        {
            var response = await _httpClient.GetAsync("http://localhost:57892/api/Offer/GetAll");

            var result = HttpResponseExtensions.ContentAsType <List <OfferDTO> >(response);

            return(result);
        }
Exemplo n.º 2
0
        public async Task <InterviewDTO> GetById(string Id)
        {
            var response = await _httpClient.GetAsync("http://localhost:57892/api/Interview/GetById?Id=" + Id);

            var result = HttpResponseExtensions.ContentAsType <InterviewDTO>(response);

            return(result);
        }
Exemplo n.º 3
0
        public async Task <List <PersonelTypeDTO> > GetAllPersonelTypes()
        {
            var response = await _httpClient.GetAsync("http://localhost:57892/api/Personel/GetAllPersonelTypes");

            var result = HttpResponseExtensions.ContentAsType <List <PersonelTypeDTO> >(response);

            return(result);
        }
Exemplo n.º 4
0
        public async Task <FairDTO> AddFair(FairDTO fairDTO)
        {
            HttpRequestMessage requestMessage = new HttpRequestMessage()
            {
                RequestUri = new Uri("http://localhost:57892/api/Fair/Add"),
                Method     = HttpMethod.Post,
                Content    = HttpRequestExtensions.ContentAsByteJson(fairDTO),
            };
            var response = await _httpClient.SendAsync(requestMessage);

            var result = HttpResponseExtensions.ContentAsType <FairDTO>(response);

            return(result);
        }