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

195
Vistas
ReactJS API call - Need redirect URL in response from request with 30X status without redirecting

I have an API which returns 30X response and redirects to a specific URL. But, I want to get redirect URL from response without redirection.

I am using this in ReactJs code. Please find samples I tried:

let optionData = {
  method: "get",
  headers: headerData,
  maxRedirect: 0,
  redirect: "manual"
};
fetch(url, optionData)
    .then((response) => {
        //I need redirect URL here
        console.log(response);
        console.log(response.headers);
    })

Using this, I am getting response object as below:

{
  "body": null,
  "nodyUsed": false,
  "headers": {},
  "ok": false,
  "redirected": false,
  "status": 0,
  "statusText": "",
  "type": "opaqueredirect"
}

But, I am not getting redirect URL from this response.

I have also tried using axios, node-fetch, XMLHttpRequst.

Can you please help me to get this redirect url without redirection?

about 4 years ago · Juan Pablo Isaza
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