0

Here is the request that makes the req.body empty

const getLatest = async (limit) => (await axios({method: "GET", 
                                                url: `/posts/latest`,
                                                data: {limit: limit},})).data;

What is the problem here.

Bot Ellis
  • 108
  • 6
  • 2
    GET requests don't have any body semantics, that should probably be a query parameter. – jonrsharpe Sep 13 '22 at 19:25
  • 1
    Does this answer your question? [axios get request with body and header](https://stackoverflow.com/questions/70445278/axios-get-request-with-body-and-header) – Matt Sep 14 '22 at 01:13

0 Answers0