this type of API = x-www-form-urlencoded calling is new for me. please guide me on how can I send my token with this I tried this way but its not working
let data = new URLSearchParams();
data.append("account_type", asyncData.data?.account_type);
const response = await fetch(URLs.update, {
method: "POST",
params:{ token }
headers: {
Accept: "application/json",
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
body: data.toString(),
});
using fetch method, this is how you can implement it :