i am doing a react project now and there is an api to fetch a list which is a GET request. In that request i have to pass parameters as formdata. Im using axios to make api calls. I tried the below code
const formData = new FormData();
formData.append("name", "john");
return await API.get(
"api/endpoint/getAllEmployees",
formData
// {
// headers: {
// "content-type": "multipart/form-data",
// },
// }
);
but when i look at the network tab,there is no formdata is sent with the request. Do anyone know how to send formdata in a get request using axios