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

126
Visualizações
URL Parse through ajax call on React

I have the question regarding URL encoding / decoding

For example, here's the sample : 123.456.789.012:/test/stackoverflow

When I simply encode it from javascript it became : 123.456.789.012%3A%2Ftest%2Fstackoverflow

It dind't work I got 400 errors.

Then I tested on Swagger at there they changed my url parameter as below: 123.456.789.012%253A%252Ftest%252Fstackoverflow

So I found out the rule from Swagger as

: %253A / %252F

Here's the question how I can change : or / character according to this rule? For now I simply replace it as below : const encoded = url.replaceAll('/','%252F').replaceAll(':', '%253A');

Please help me with better way to fix this problem.

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