Describe the bug
Trying to send a simple get request using Axios by doing:
const url = new URL(document.location.href);
try {
const response = await axios.get(url, { params: { test: "Hi" } });
} catch (err) {
console.log(err);
}
Error on the console about url.indexOf is not a function.
As soon as I change it to url.toString(), Axios performs the request.
It's getting stuck at var hashmarkIndex = url.indexOf("#"); (Line 1753 of dist/axios.js).
To Reproduce
No response
Code snippet
No response
Expected behavior
No response
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
Describe the bug
Trying to send a simple get request using Axios by doing:
Error on the console about
url.indexOf is not a function.As soon as I change it to
url.toString(), Axios performs the request.It's getting stuck at
var hashmarkIndex = url.indexOf("#");(Line 1753 of dist/axios.js).To Reproduce
No response
Code snippet
No response
Expected behavior
No response
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response