Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

193
Visualizações
Get request is not working with axios but working with postman

I've made a MongoDB GET request route named users/auth to create authentication by searching for the records provided in the request's body, inside the database. When I send the request via POSTMAN then it gives the expected response (eg: "true") enter image description here

But when I tried to send the same request inside my react-app with AXIOS it gives an unexpected response(eg: false) with status code: ok. I'm not sure of what wrong I'm doing.

//some valid objects which should return true
//but it return's false
users = {
"email": 'abc@gm.com',
"password": 'abcdef'
}

axios.get('http://localhost:5000/users/auth', users)
        .then(res => {
            console.log(res.data);
  //expected: true
  // actual result: false
        })
        .catch(error => console.log(error))

I've read this problem but It didn't fixed my problem.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda