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

158
Visualizações
What is the recommend way to encode forward slashs as a url param

I'm looking for some information on the best approach to url encode text client side before it's passed to an api call.

I have a text box that takes a word or multiple words from the user. A button is clicked which takes the text and passes it as a param into a api call.

If a user includes a slash in the text, such as desk / table this errors out as the forward slash isn't encoded and it essentially breaks the endpoint.

Example

https://www.example.com/search/desk%20/%20table

I wan't to encode the the forward clash so it's not seen as an additional path. Whats the correct way to do this. Would it be using encodeURIComponent.

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