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".