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

210
Vistas
Getting double requests from axios

I am using axios in my react app to make calls to a api server. My api server is receiving double network calls for each request (one from my react app user agent and one from axios).

Nginx logs:

52.01.179.169 - - [09/Jan/2017:02:17:13 +0000] "GET /my_endpoint HTTP/1.1" 200 756 "-" "axios/0.9.1" "-"
72.201.237.55 - - [09/Jan/2017:02:17:13 +0000] "GET /my_endpoint HTTP/1.1" 200 756 "http://localhost:8080" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36" "-"

Why is this happening? The second request is what I really care about, but my api server is unnecessarily doing double the work.

My web console indicates that only one AJAX call is being made, so where is this rogue axios request coming from?

Code:

export function myEndpoint() {
  var url = API_BASE_URL + '/my_endpoint'

  console.log(url);
  const request = axios.get(url);

  return {
    type: 'my_endpoint',
    payload: request
  };
}

FWIW, the console only logs this url once.

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