Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.5K
Vistas
Axios setRequestHeader method with UTF-8

I am trying to add some headers in my request. But header values may include some Turkish characters (like ğ, ş, ö etc.) and when I tried this, I got this error:

TypeError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': String contains non ISO-8859-1 code point.
    at setRequestHeader (xhr.js:132)
    at Object.forEach (utils.js:253)
    at dispatchXhrRequest (xhr.js:126)
    at new Promise (<anonymous>)
    at xhrAdapter (xhr.js:13)
    at dispatchRequest (dispatchRequest.js:52)
    at :3000/report/async http:/localhost:3000/static/js/main.chunk.js:4137

I guess axios supports ISO-8859-1 characters when add my custom headers to header list. Is it possible change axios' supported charset to UTF-8?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

let headers = {"userId": user.id, "username":user.username, "relatedName": encodeURIComponent(values.username)}; Encode at React. relatedName = URLDecoder.decode(request.getHeader("relatedName"), StandardCharsets.UTF_8.name()); Decode at Java.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda