How to send axios post with application / x-www-form-urlencoded?
I need to send a refresh token, but when requested, an empty object is sent, although if you look in "userData.data.refresh_token", then the token is definitely there
const params = new URLSearchParams();
const test = params.append("refresh_token", userData.data.refresh_token);
console.log(test) // undefined
console.log(userData) // token not empty
axios.post(`${API_URL}/api/login_check`, test, (res) => {
login(res);
});