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

246
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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