Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!