how can I something like this, sending body params and header with Authorization token into this
const searchByDate = async ({ date1, date2 }) => {
  const tokenApp = window.localStorage.getItem('token');
  const { data: res } = await axios.get(`${baseUrl}/search`, {
    data: { date1: date1, date2: date2 },
    headers: { Authorization: `${tokenApp}` },
  });
  return res;
};
so far it is throwing me an error Required request body is missing

 
     
     
    