title: Why data is getting undefined on the server side coming from client side ? (reactjs to nodejs)
body: <p>I am trying to send the data as parameters in <code>GET</code> route. But on server side when I am checking its <code>undefined</code>. What I am doing wrong?</p>
  <p><strong>Below is the <code>React</code> code:</strong></p>
  <p><strong>P.S.: Here process.env.REACT_APP_API = localhost:5000/api</strong></p>
  <pre><code>const App = () =&gt; {
  
    const [state, setState] = useState({
      page: 0,
      search: &quot;&quot;,
      username: &quot;Hey Baby!&quot;,
      typingTimeout: 0,
      load: true,
      filter: [&quot;search&quot;, &quot;story&quot;, 0],
      result: 0,
      processTime: 0
    });
  
  const { page, search, username, typingTimeout, load, filter, result, processTime } = state;
  
  const [posts, setPosts] = useState([]);
  
  const fetchPosts = () =&gt; {
  
         alert(filter); //Here I am getting the filter **array** values successfully
  
          axios
              .get(`${process.env.REACT_APP_API}/posts`,
   { page, search, username, typingTimeout, load, filter, result, processTime })
              .then(response =&gt; {
                   console.log(response.data.datas);
                  setPosts(response.data.datas);
              })
              .catch(error =&gt; alert(error));
      };
  
      useEffect(() =&gt; {
          fetchPosts();
      }, []);
  
  return (
  ----------html code------
  )
  
  }
  </code></pre>
  <p><strong>Below is the <code>Node Controller/Route</code> code:</strong></p>
  <pre><code>router.get('/posts', list);  //route
  
  exports.list = async(req, res) =&gt; {  //controller
  
    const {  page, search, username, typingTimeout, load, filter, result, processTime } = req.body;
    console.log(&quot;filter = &quot; +  filter);
  
    console.log(&quot;page = &quot; + page);
  
    await Axios.get(
       `http://hn.algolia.com/api/v1/${f1}?query=&amp;tags=${f2}&amp;page=${page}&amp;numericFilters=created_at_i&gt;0`
       )
       .then((r) =&gt; {
         console.log(r.data.hits);
         res.send({ datas: r.data.hits });
       })
       .catch((err) =&gt; {
         console.log(&quot;err = &quot;+ err);
       });
  };
  </code></pre>
  <p>This is what I am getting into the <code>console</code> in <code>nodejs</code> side:</p>
  <pre><code>[nodemon] restarting due to changes...
  GET /api/posts - - ms - -
  filter = undefined
  page = undefined
  </code></pre>