Example #1
0
    void Start()
    {
        Uri endpoint = new Uri("http://creative.semantika.si/api/MemoryApp");

        //Fire off the request!
        m_searchResult = m_restClient.Get <List <string> >(endpoint, new { tag = m_searchQuery });
    }
        public async Task <ActionResult> Delete(int id)
        {
            RESTClient client = new RESTClient(baseUrl);

            var response = await client.Get <CandidatoViewModel>($"api/Candidato/{id}");

            return(View(response));
        }
        public void StartSearch(string query)
        {
            Reset();

            SearchQuery = query;
            HasStarted  = true;

            restClient = new RESTClient();
            Results    = restClient.Get <List <string> >(endpoint, new { tag = SearchQuery });
        }
        public void StartSearch(string query)
        {
            Reset();

            SearchQuery = query;
            HasStarted = true;

            restClient = new RESTClient();
            Results = restClient.Get<List<string>>(endpoint, new { tag = SearchQuery });
        }
        public void Get()
        {
            var testMethod = HTTPMethod.GET;
            var testRest   = new RESTClient <int, int>();

            testRest.Get();
            var actualMethod = testRest.method;

            Assert.AreEqual(testMethod, actualMethod);
        }
        public async Task <ActionResult> List()
        {
            ClearCreateCandidatoSession();
            ClearUpdateCandidatoSession();

            RESTClient client = new RESTClient(baseUrl);

            var response = await client.Get <IEnumerable <CandidatoListViewModel> >("api/Candidato");

            return(View(response));
        }
        public async Task <ActionResult> Update(int id)
        {
            RESTClient client = new RESTClient(baseUrl);

            var response = await client.Get <CandidatoDTO>($"api/Candidato/{id}");

            Session["UpdateId"] = id;
            Session["UpdateInformacoesDeContato"]      = new InformacoesDeContatoInputModel(response);
            Session["UpdatePreferenciasDeTrabalho"]    = new PreferenciasDeTrabalhoInputModel(response);
            Session["UpdateQuestionarioDeHabilidades"] = new QuestionarioDeHabilidadesInputModel(response);
            Session["UpdateInformacoesParaPagamento"]  = new InformacoesParaPagamentoInputModel(response);

            return(RedirectToAction("UpdateInformacoesDeContato"));
        }
Example #8
0
        public string GetURLWebAPI(string rootUrl, string dataUrl)
        {
            RESTClient restClient = new RESTClient(rootUrl, LIMSAppKey);

            try
            {
                return(restClient.Get(dataUrl));
            }
            catch (Exception ex)
            {
                //Console.WriteLine(ex.Message);
                //throw ex;
                log.Error(ex.Message);
                return(ex.Message);
            }
        }
Example #9
0
        public string GetURLWebAPI(string rootUrl, string dataUrl)
        {
            RESTClient restClient = new RESTClient(rootUrl, _LIMSAppKey);

            try
            {
                return(restClient.Get(dataUrl));
            }
            catch (Exception ex)
            {
                //Console.WriteLine(ex.Message);
                //throw ex;
                writeLog(ex.Message, " Get:" + rootUrl + dataUrl);
                throw ex;
            }
        }