public IEnumerable <VrstaDto> GetVrste() { HttpClient httpClient = GetHttpClient(); UrlBuilder urlBuilder = new UrlBuilder(this.ApiSettings); HttpResponseMessage httpResponseMessage = httpClient.GetAsync(urlBuilder.Append("api/vrsta").GetUrl()).Result; return(JsonConvert.DeserializeObject <List <VrstaDto> >(httpResponseMessage.Content .ReadAsStringAsync().Result)); }
public NaslovDto GetById(int id) { HttpClient httpClient = GetHttpClient(); UrlBuilder urlBuilder = new UrlBuilder(this.ApiSettings); HttpResponseMessage httpResponseMessage = httpClient.GetAsync(urlBuilder.Append(ControllerName).Append("get").Append(id.ToString()).GetUrl()).Result; return(JsonConvert.DeserializeObject <NaslovDto>(httpResponseMessage.Content .ReadAsStringAsync().Result)); }
public IEnumerable <EvidencijaDugovanjaDto> GetEvidencijuDugovanja(int id) { HttpClient httpClient = GetHttpClient(); UrlBuilder urlBuilder = new UrlBuilder(this.ApiSettings); HttpResponseMessage httpResponseMessage = httpClient.GetAsync(urlBuilder.Append("api/evidencijadugovanja/getbynaslov").Append(id.ToString()).GetUrl()).Result; return(JsonConvert.DeserializeObject <List <EvidencijaDugovanjaDto> >(httpResponseMessage.Content .ReadAsStringAsync().Result)); }