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

238
Views
Get wrong parameter from get method in nodejs

I'm trying to send get method request and want to pass value in URL.

Like my api look like

app.get('/api/getlocation/:customerName', customer.getlocation);

For call this I wrote in postman

localhost:8080/api/getlocation/:customerName=kumbhani

For test

var customerName = req.params.customerName;
console.log('name', customerName); // =kumbhani

It returns name with = sign - I want only kumbhani

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The colon character in the path in Express has a special meaning: whatever you put in the URL after getLocation/ will be put in req.params.customerName.

This means in Postman, you should actually call this URL:

localhost:8080/api/getlocation/kumbhani

→ See related question.

over 4 years ago · Santiago Trujillo Report
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!