How to limit the axios get request results

I am trying use an axios request to fetch data from github api, but for some reason _limit is not returning the limited number of results?

await axios.get(``)
                (res) => {

The following http request is working perfectly by limiting the results

Whereas the following http request is not limiting the data

What’s the difference between the above two requests?

>Solution :

The _limit parameter you see in is specific to their json-server software.

From the Github REST API documentation, you want to use the per_page parameter

const { data } = await axios.get("", {
  params: {
    per_page: 10

Leave a Reply