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

448
Views
Remove trailing slash at the end of axios url request

I am trying to do a request with axios, but it keeps adding a trailing slash right before my query parameters and so it stops working, I can't figure out for the life of me what the hell is its problem and I cant find any options in the config to remove it.

This is the url that I want to send request to

http://localhost:3000/api/competition/player-joined?userId=${accounts[i].dbId}&competitionId=a80flwvap1lbhef3d704

Axios sends request to this instead:

http://localhost:3000/api/competition/player-joined/?userId=${accounts[i].dbId}&competitionId=a80flwvap1lbhef3d704

There is a / right before the ? being added by axios itself when sending the request.

This is a standalone js file that I am running with node.

The suggested questions that solve this issue DO NOT SOLVE THE ISSUE.

Also, Axios is automatically doing that, I am not giving it a string with a slash, so its not a matter of simple "replace string".

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