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

149
Visualizações
Is this method recommended for query strings in expressjs?

Currently making an application which needs to parse a query string with repeated values. Right now what I'm doing is something like this.

GET /api/titles?status=green&status=red which returns an array in the req.query.status like this req.query.status: ["green", "red"].

This can get cumbersome on the client side with a long url string when many fields are required. I've discovered that this works as well. GET /api/titles?status=green,red which returns something like this req.query.status: "green,red". I can then split this string into an array by running req.query.status.split(","). This results in an array with the same results to ["green", "red"].

My question is this a recommended way of doing this? Are there any security risks for running this?

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