Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!