How do I hide or clear the url while giving a get in asp.net mvc?

0

I would like to know how to clean or hide data that I pass through a URL to a webapi so that the data does not become apparent and does not get in the way of my routes.

follows example: http://localhost:65286/Cliente/Login?Email=alguem%40gmail.com&Password=123123123

       public IActionResult Login(string Email, string Password)
    {
        HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, BaseUrlFuncionario + "/Login/"+ Email +"/"+ Password);

        HttpResponseMessage response = HttpInstance.GetHttpClientInstance().SendAsync(request).Result;

        Funcionario funcionario = new Funcionario();

        string l = response.Content.ReadAsStringAsync().Result;
        funcionario = JsonConvert.DeserializeObject<Funcionario>(l);

        if (response.IsSuccessStatusCode)
        {
            TempData["Funcionario"] = funcionario;
            return View("Principal", TempData);
        }
        else
        {
            return BadRequest();
        }

    }
    
asked by anonymous 15.11.2017 / 21:09

1 answer

1

Change the method from GET to POST and I believe it will solve your problem

    
15.11.2017 / 23:46